用VC写的一个ATL,在Delphi6中调用时:VC中的接口:
[id(1), helpstring("method GetID")] HRESULT GetID([in]long n1, [in]long n2, [out, retval]long* pVal);
通过Import Type Library生成的*.TLB文件中:
有时候生成:
...
function GetID(n1: Integer; n2: Integer; out pVal: Integer): HResult; stdcall; //调用正确
...
而有时候生成:
...
function GetID(n1: Integer; n2: Integer): integer; stdcall; //调用出错
...
不知是为什么。
[id(1), helpstring("method GetID")] HRESULT GetID([in]long n1, [in]long n2, [out, retval]long* pVal);
通过Import Type Library生成的*.TLB文件中:
有时候生成:
...
function GetID(n1: Integer; n2: Integer; out pVal: Integer): HResult; stdcall; //调用正确
...
而有时候生成:
...
function GetID(n1: Integer; n2: Integer): integer; stdcall; //调用出错
...
不知是为什么。
解决方案 »
- 在线等待200分-用corba开发的系统临近运行,发现多网段corba客户端无法访问corba服务器。
- 有幸接到个门票管理的项目,望兄弟们给些建议和方法!先谢了!
- fastreport这个脚本怎么写,急急急,在线等
- SOS:问天下谁是高手?tomcat activex 的问题
- 如何实现按下按钮的进候有声音发出?
- M D I应用程序的疑难问题
- FastReport 和 OpenDialog1 一起用怎么就打印不了 兼容性 ?
- 请问有没有比较好一点的多线程复制文件的控件。谢谢。
- 大家快来!有没有好用的文件目录复制控件!介绍几个...
- 一个关于dbgrid的简单问题,大家快来拿分,80分送上!
- 求DBGridEh导出到Excel最快的方法
- DBGrid显示Excel数据的问题
通过Import Type Library自动生成的*.TLB文件中为什么有时候是:
IBillOpr = interface(IDispatch)
['{34E6BBDA-ACE9-47CD-A0FB-A731020004B2}']
...
function GetID(n1: Integer; n2: Integer; out pVal: Integer): HResult; stdcall;//能正确调用
...
end;而有时候是:
IBillOpr = interface(IDispatch)
['{34E6BBDA-ACE9-47CD-A0FB-A731020004B2}']
...
function GetID(n1: Integer; n2: Integer): integer; stdcall;//该种情况下会产生“找不到组件”错误
...
end;
呢。