#include <windows.h>
typedef void(* MYPROC)(char *);
int _tmain(int argc, _TCHAR* argv[])
{
HINSTANCE hinstLib;
BOOL fFreeResult = FALSE;
MYPROC myProc;
hinstLib = LoadLibrary(L"mydll");
if (NULL != hinstLib)
{
myProc = (MYPROC)GetProcAddress(hinstLib, "testMain");
if (NULL != myProc)
{
myProc("abc");
}
fFreeResult = FreeLibrary(hinstLib);
}
return 0;
}
vs2008动态加载dll库
最新推荐文章于 2020-10-05 16:58:50 发布