为什么在CPropertySheet的构造里调用DLL会报错呢?
CInfoQuerySheet::CInfoQuerySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
m_psh.dwFlags |= PSH_NOAPPLYNOW; // Lose the Apply Now button
AddPage(&m_Page1);
HINSTANCE hDllInst = ::LoadLibrary("ProQueryRoute.dll");
if(hDllInst)
{
typedef DWORD (WINAPI *MYFUNC)(CInfoQuerySheet*);
MYFUNC MyFuntionNameAlias = NULL;
MyFuntionNameAlias = (MYFUNC)GetProcAddress(hDllInst,"GetDlgQueryRoute");
if(MyFuntionNameAlias)
{
MyFuntionNameAlias(this);
}
}
ProQueryRoute.dll这个里实际上是又添加了一页。不是DLL本身问题,空函数也是会报错的,是不是加载有问题呢?谢谢诸位了