DLL返回Variant类型供VC用该如何实现呀! ( 积分: 100 )

  • 主题发起人 SmallGhost
  • 开始时间
S

SmallGhost

Unregistered / Unconfirmed
GUEST, unregistred user!
我用Delphi作了一个函数,他的返回值是Variant类型的,在VC中可以
调用该函数吗?
函数:
function getValue:Variant;
begin
Result := '123123' ;
end;

VC调用该函数后得到字符串'123123'可以吗?
 
我用Delphi作了一个函数,他的返回值是Variant类型的,在VC中可以
调用该函数吗?
函数:
function getValue:Variant;
begin
Result := '123123' ;
end;

VC调用该函数后得到字符串'123123'可以吗?
 
没有人做过吗?
 
注意调用约定.
Delphi默认的调用约定是Registry方式.速度最快.但是是Delphi独有的.和其他语言交流可以用如下方式
function getValue:Variant;stdcall;
//VC里面也要声明成 __stdcall形式的
function getValue:Variant;cdecl;
//VC里面要声明成 __cdcel形式的
 

Similar threads

S
回复
0
查看
950
SUNSTONE的Delphi笔记
S
S
回复
0
查看
774
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部