您的位置:首页 > 其它

DLL运行时动态加加载的问题

2014-03-16 11:55 399 查看
1、error C2440: 'initializing' : cannot convert from 'int (__stdcall *)(void)' to 'void (__cdecl *)(const char *)'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast

  解决方法:要对GetProcAddress()函数的指针强制转换,如
typedef void (*PFN)(LPCTSTR);
               PFN pfun=(PFN)::GetProcAddress(hModule,"ExportFunc");

2、

file: i386\chkesp.c Line: 42

 解决方法:声明函数指针时用默认的调用__cdecl,而不要用__stdcall

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: