心代码片断:
void CLoadLibraryTestDlg::OnLoad()
{
typedef int (WINAPI * MyFun)(HWND,LPCTSTR,LPCTSTR,UINT);
MyFun fun=NULL;
HINSTANCE hHandle;
hHandle=LoadLibrary("user32.dll");
fun=(int (WINAPI *)(HWND,LPCTSTR,LPCTSTR,UINT))::GetProcAddress(hHandle,"MessageBoxA");
if(fun!=NULL)
{
fun(NULL,"hahahahahahahaha","success :)",MB_OK);
}
}
void CLoadLibraryTestDlg::OnLoad()
{
typedef int (WINAPI * MyFun)(HWND,LPCTSTR,LPCTSTR,UINT);
MyFun fun=NULL;
HINSTANCE hHandle;
hHandle=LoadLibrary("user32.dll");
fun=(int (WINAPI *)(HWND,LPCTSTR,LPCTSTR,UINT))::GetProcAddress(hHandle,"MessageBoxA");
if(fun!=NULL)
{
fun(NULL,"hahahahahahahaha","success :)",MB_OK);
}
}