我用VC调用 DEPHI编写的动态连接库,
原函数声明方式是:
Debug Error!
Program: F:\Test_Srv.exe
Module:
File: i386\chkesp.c
Line:42
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 convention with a funtion pointer declared with a different calling convention.调用方式是:HINSTANCE hDLL;
hDLL = LoadLibrary(_T(".\\aa.dll"));if( hDLL == NULL ){
DWORD dd = GetLastError(); CString sMsg0;
if( dd == ERROR_MOD_NOT_FOUND ){
sMsg0.Format("The specified module could not be found.[%d]\n",dd);
}else{
sMsg0.Format("装载动态库出错![%d]\n",dd);
} MessageBox( sMsg0, "通知", MB_ICONERROR );
return ;
}
typedef LPCSTR (*FUNC)( LPCSTR, LPCSTR, LPCSTR, LPCSTR);
FUNC posturl;posturl = (FUNC)GetProcAddress(hDLL, "posturl");::string2file(sItemValue);
sResult = posturl( sUrl, sItemValue, "", "0" );我在其他vc程序通过上面的代码执行没有问题,请问是什么原因?
原函数声明方式是:
Debug Error!
Program: F:\Test_Srv.exe
Module:
File: i386\chkesp.c
Line:42
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 convention with a funtion pointer declared with a different calling convention.调用方式是:HINSTANCE hDLL;
hDLL = LoadLibrary(_T(".\\aa.dll"));if( hDLL == NULL ){
DWORD dd = GetLastError(); CString sMsg0;
if( dd == ERROR_MOD_NOT_FOUND ){
sMsg0.Format("The specified module could not be found.[%d]\n",dd);
}else{
sMsg0.Format("装载动态库出错![%d]\n",dd);
} MessageBox( sMsg0, "通知", MB_ICONERROR );
return ;
}
typedef LPCSTR (*FUNC)( LPCSTR, LPCSTR, LPCSTR, LPCSTR);
FUNC posturl;posturl = (FUNC)GetProcAddress(hDLL, "posturl");::string2file(sItemValue);
sResult = posturl( sUrl, sItemValue, "", "0" );我在其他vc程序通过上面的代码执行没有问题,请问是什么原因?
解决方案 »
- 是否有好的VC作图开源控件,数据采集显示用,要有光标。
- VC求救!做了一个对话框程,输入姓名 确定后弹出此人的资料!!
- 用VC做一个简易画图板都需要什么知识
- 菜鸟求助:关于改变字符串的颜色
- 使用CStdioFile时,用什么来判断是否己经读到文件结尾?相当于File中的feof()?
- 算法问题讨论,有难度!
- 今天收到了MSDN技术支持小组关于VC.NET 2002下 BYTE 类型在调试中数据显示不正常的回复。证实VC.NET 2002在这个方面有一个Bug
- 进来看看
- 什么叫XML?这里好多.XML呀,我怎么才能打开?
- Win2000下怎么修改屏幕分辨率和颜色?
- ●●●●●在线急等,一个回调函数引发的问题●●●●●
- [急]点阵字库的字符显示问题
是不是还需要配置什么?
如:
project ->seting->link或者debug里面需要配置什么?