DLL调试的问题(新手,在线等)
在DLL中定义了一个函数
MYDLL_API int test(int i)
{
i++;
return i;
}
生成后在test 中调用
HINSTANCE hDLL=NULL;
hDLL=::LoadLibrary("MyDLL.dll");
typedef int(*TEST)(int i);
TEST test;
if(hDLL==NULL)
{ MessageBox("Load library failed");
}
test=(TEST)GetProcAddress(hDLL,"test");
if(test==NULL)
MessageBox("FAIL");
}
为什么返回的tset都是NULL!