Terry Thrift
2006-02-21 14:15:13 UTC
Hi:
I'm working on a C++ DLL that is called from someone else's delphi app.
Delphi Interface
----------------
A delphi DLL interface that works is:
library FOOBAR;
function DLL(s: shortstring; var i,j,k,l,w,x,y,z: variant): variant;
stdcall;
begin
DLL:=2;
end;
exports
DLL;
begin
end.
C++Builder6 CPP Interface
---------------------
I attempted to translate the delphi DLL interface to CPP as follows:
Variant WINAPI DLL ( ShortString s, Variant &i, Variant &j, Variant &k,
Variant &l, Variant &w, Variant &x, Variant &y, Variant &z)
{
Variant vRet((int)2);
return vRet;
}
It compiles fine but does not return the correct value to the host
application.
Could someone please show me a correct translation of the above delphi
DLL interface to C++?
thx
-Terry Thrift-
I'm working on a C++ DLL that is called from someone else's delphi app.
Delphi Interface
----------------
A delphi DLL interface that works is:
library FOOBAR;
function DLL(s: shortstring; var i,j,k,l,w,x,y,z: variant): variant;
stdcall;
begin
DLL:=2;
end;
exports
DLL;
begin
end.
C++Builder6 CPP Interface
---------------------
I attempted to translate the delphi DLL interface to CPP as follows:
Variant WINAPI DLL ( ShortString s, Variant &i, Variant &j, Variant &k,
Variant &l, Variant &w, Variant &x, Variant &y, Variant &z)
{
Variant vRet((int)2);
return vRet;
}
It compiles fine but does not return the correct value to the host
application.
Could someone please show me a correct translation of the above delphi
DLL interface to C++?
thx
-Terry Thrift-