标签:
用VC新建一对话框工程,在一按钮点击事件中添加如下代码:
typedef void (WINAPI * TESTDLL)();
HINSTANCE hmod;
hmod = ::LoadLibrary ("my.dll");
if(hmod==NULL)
{
AfxMessageBox("Fail");
}
TESTDLL lpproc;
lpproc = (TESTDLL)GetProcAddress (hmod,"Show");
if(lpproc!=(TESTDLL)NULL)
(*lpproc)();
FreeLibrary(hmod);
标签:
原文地址:http://www.cnblogs.com/mol1995/p/5964844.html