导出函数错误?(在线等,立即结贴)
错误信息:
error C2440: 'initializing' :
cannot convert from 'int (__stdcall *)(void)'
to 'int (__cdecl *)(char *,char *)'
dll函数说明:
INT RCARD(CHAR *COMP,CHAR *DBUF)
返回: 整型
参数:
COMP: 字符串
DBUF: 字符串
代码如下:
第一次测试能成灾如连接库,
第二次测试调用函数错误
HINSTANCE hinstDlltest =LoadLibrary("LK607WNT.DLL");
if (hinstDlltest!= NULL)
{ MessageBox("载入成功");
typedef INT(_cdecl *Connect)(CHAR *COMP,CHAR *DATA);
Connect proc=::GetProcAddress(hinstDlltest, "RCARD");
if(proc!=NULL)
{
MessageBox("倒入成功");
}
}