如下是公司其它语言在用的申明函数。请教高手如何转化成易语言的,并在成功连接后返回真。谢谢。
你的回复最好是代码呈现。我新手,文字教程有点难看懂。
函数声明
typedef bool (__stdcall * MesStart)();
typedef bool (__stdcall * MesClose)();
typedef bool (__stdcall * MesTransfer)(int, const char*, int*);
C加载Dll
h=LoadLibrary("MESConnect.dll");
if (NULL == h)
{
AfxMessageBox("\"MESConnect.dll\" load FAIL!");
return FALSE;
}
else
{
SajetTransStart = (MesStart)GetProcAddress(h,"MESTransStart");
SajetTransClose = (MesClose)GetProcAddress(h,"MESTransClose");
SajetTransData = (MesTransfer)GetProcAddress(h,"MESTransData");
}
能提供具体的代码吗?你说的这个我看不明白啊。
追答把C写的DLL写成cdecl约定就可以了