vc6.0移植到vs2010 dialog出错
先加载相应dll
g_ReleaseLogger(_T("Load language: %s"), g_config_info.GetLanguagePath());
HMODULE h_langdll=::LoadLibrary(g_config_info.GetLanguagePath());
if (h_langdll)
{
AfxSetResourceHandle(h_langdll);
}
...........
CSmtpManagerDlg dlg;//debug到这里出错
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
编译没有错,运行时出错,说堆出错,dll坏了,最后进入CStringData* CAfxStringMgr::Reallocate( CStringData* pData, int nChars, int nCharSize ) throw()当中,被抛出这个异常,我猜应该是内存分配出错了,调试根本就没进入CSmtpManagerDlg的构造方法,进入父类,但往后调试,我是调不下去了,不知道那位能帮我一下呀