64,282
社区成员
发帖
与我相关
我的任务
分享
#ifdef _cplusplus
extern "C"{
#endif
__declspec(dllexport) void Trim(LPSTR lpString)
{
········· }
HMODULE dlh = NULL;
abc ab;
if (!(dlh=LoadLibrary("myDll.dll")))
{
printf("LoadLibrary() failed: %d\n", GetLastError()); //这里没有执行说明,加载成功
}
if (!(ab =(abc)GetProcAddress(dlh, "Trim")))
{
printf("GetProcAddress() failed: %d\n", GetLastError());
//这里执行了,并且报GetProcAddress() 127的错
}