|
HINSTANCE hDll = NULL; //DLL句柄
typedef int(_stdcall* SETHOSTINFO)(wchar_t*, int, wchar_t*, wchar_t*, wchar_t*);
SETHOSTINFO SetHost;
hDll=LoadLibrary(L"FtpDll.dll");
//hDll=LoadLibrary(L"testLib.dll");
if (hDll != NULL)
{
SetHost = (SETHOSTINFO)GetProcAddress(hDll,L"SetHostInfo");
if (SetHost == NULL)
{
AfxMessageBox(L"Get dll interface err!");
}
}
else
{
AfxMessageBox(L"Load dll Err");
}
|
|