K
kelvin.koogan
How can I call a function in a Delphi DLL from C++/CLI?
The Delphi function is declared as follows:
function Func1(IsDsb: Boolean; FirstStr, SecondStr : String): String;
I've tried
[DllImport("mydll", EntryPoint="Func1")]
extern "C" char *Func1(int isDsb, char *firstString, char
*secondString);
Func1(0, "kl;kl;sdfk", "kdlks;ldfk");
but I get an access violation. What should I be doing?
What calling convention will the Delphi function use? Does it need to
have stdcall added?
TIA,
KK
The Delphi function is declared as follows:
function Func1(IsDsb: Boolean; FirstStr, SecondStr : String): String;
I've tried
[DllImport("mydll", EntryPoint="Func1")]
extern "C" char *Func1(int isDsb, char *firstString, char
*secondString);
Func1(0, "kl;kl;sdfk", "kdlks;ldfk");
but I get an access violation. What should I be doing?
What calling convention will the Delphi function use? Does it need to
have stdcall added?
TIA,
KK