I have a Delphi 2010 DLL with two methods:
function Foo1(a, b: Integer):PChar; export; stdcall; function Foo2(a, b, c:Integer):PChar; export; stdcall; exports Foo1, Foo2;
Each of them returns Result := PChar('Test') .
My C ++ \ CLI Code
in the title
typedef const wchar_t* (*pFUNC1)(int a, int b); pFUNC1 TestFoo1; typedef const wchar_t* (*pFUNC2)(int a, int b, int c); pFUNC2 TestFoo2;
Initialize with the LoadLibrary and GetProcAddress functions. Usage: TestFoo1(0,0) and TestFoo2(0,0,0) ;
Both work in Release mode.
But in debug mode, Foo2 is interrupted.
Please report what is wrong.
Redcat
source share