SOS!!!!!进来吧!为什么VC调用DELPHI的DLL总是出错误,知道者出来说句话吧!
错误信息:the value of ESp was not properly saved across a function call. this is usually a result of calling a function declared with one calling converntion with a function pointer declared with a diffferent calling convention
DELPHI的DLL声明如下:
function FindMin(numA : PChar; numB :PChar):PChar ;StdCall
implementation
function FindMin; external 'PENNIESLIB.DLL' name 'FindMin';
VC调用如下:
#define DllExport __declspec(dllimport) _stdcall
extern "C" char * DllExport FindMin(char * numA,char * numB);
....
VERIFY(hIn=::LoadLibrary("PenniesLib.dll"));
VERIFY(p_Result=(MINTYPE*)::GetProcAddress((HMODULE)hIn, "FindMin"));
i_return=(*p_Result)("ss","dd"); //错误信息就在这一行出现!
这个问题几天了都有没有解决?
VC能调用DELHPI写DLL的吗?调用过的请帮帮吧!