A
alvinlv
Unregistered / Unconfirmed
GUEST, unregistred user!
我用delphi写了个dll: function SaveBFile( sReceiver, sFileName : PChar;
Var Buffer;
iBufLen : Integer ) : Integer;
stdcall;
用deiphi 写的程序调用这个dll没有问题。可是vc++调用时,
系统提示:The value of ESP was not propely saved across a function call.
vc++
*.h:
int ( * savebfile ) ( char * sRec,
char * sFileName,
char * sCon,
int len);
*.cpp:
hDll = LoadLibrary(dllname);
if (hDll != NULL) {
savebfile = ( int (*) ( char *, char *,
char *, int) )
GetProcAddress(hDll,"SaveBFile");
( * savebfile ) ("2000000001", "kk.txt", "kklf", 12);
}
虽然发生错误, 但dll的功能却执行完了。
个人怀疑是由于buffer 参数传递的问题.
请教各位大侠错误的原因,及如何才能正确调用?
Var Buffer;
iBufLen : Integer ) : Integer;
stdcall;
用deiphi 写的程序调用这个dll没有问题。可是vc++调用时,
系统提示:The value of ESP was not propely saved across a function call.
vc++
*.h:
int ( * savebfile ) ( char * sRec,
char * sFileName,
char * sCon,
int len);
*.cpp:
hDll = LoadLibrary(dllname);
if (hDll != NULL) {
savebfile = ( int (*) ( char *, char *,
char *, int) )
GetProcAddress(hDll,"SaveBFile");
( * savebfile ) ("2000000001", "kk.txt", "kklf", 12);
}
虽然发生错误, 但dll的功能却执行完了。
个人怀疑是由于buffer 参数传递的问题.
请教各位大侠错误的原因,及如何才能正确调用?