AfxWinMain

场景:MFC AfxWinMain 读取位置 0x00000000 时发作访问冲突

MFC AfxWinMain 读取位置 0x00000000 时发生访问冲突
RT  

AfxWinMain 函数中的
if (!pThread->InitInstance()) // 这里出错了
{
if (pThread->m_pMainWnd != NULL)
{
TRACE(traceAppMsg, 0, "Warning: Destroying non-NULL m_pMainWnd\n");
pThread->m_pMainWnd->DestroyWindow();
}
nReturnCode = pThread->ExitInstance();
goto InitFailure;
}



网上大侠们说是 InitInstance()为NULL 了 不知道怎么改?有大侠遇到过这问题吗?

------解决方案--------------------
看下你的App类的InitInstance函数里怎么写的?
------解决方案--------------------
你的theApp对象被误删了