void CSetupDlg::OnSetupBtn()
{
// TODO: Add your control notification handler code here
typedef void (*PFUN)();
HMODULE hModule = ::LoadLibrary(_T("VnetSetupDLL.dll"));
if(hModule == NULL)
{
::FreeLibrary(hModule);
AfxMessageBox(_T("1"));
return ;
}
PFUN newfun = (PFUN)::GetProcAddress(hModule,"OnButton1");
if(newfun == NULL)
{
::FreeLibrary(hModule);
AfxMessageBox(_T("2"));
return ;
}
newfun();
::FreeLibrary(hModule);
}
{
// TODO: Add your control notification handler code here
typedef void (*PFUN)();
HMODULE hModule = ::LoadLibrary(_T("VnetSetupDLL.dll"));
if(hModule == NULL)
{
::FreeLibrary(hModule);
AfxMessageBox(_T("1"));
return ;
}
PFUN newfun = (PFUN)::GetProcAddress(hModule,"OnButton1");
if(newfun == NULL)
{
::FreeLibrary(hModule);
AfxMessageBox(_T("2"));
return ;
}
newfun();
::FreeLibrary(hModule);
}