我在VC++ 6.0中做RT模擬器。每當它執行時,沒有開放式體系結構計算機(OAC,它是飛行中的總線控制器)開啓,程序就會正常執行。但是,在OAC打開的情況下,該程序正在給調試斷言失敗 - 在Debug/.exe/wincore.cpp在行號。 980.可能是什麼問題?如果可能,請提供解決方案。調試斷言在.exe/wincore.cpp中失敗
這是copmlete DestroyWindow函數。
BOOL CWnd::DestroyWindow()
{
if (m_hWnd == NULL)
return FALSE;
CHandleMap* pMap = afxMapHWND();
ASSERT(pMap != NULL);
CWnd* pWnd = (CWnd*)pMap->LookupPermanent(m_hWnd);
#ifdef _DEBUG
HWND hWndOrig = m_hWnd;
#endif
#ifdef _AFX_NO_OCC_SUPPORT
BOOL bResult = ::DestroyWindow(m_hWnd);
#else //_AFX_NO_OCC_SUPPORT
BOOL bResult;
if (m_pCtrlSite == NULL)
bResult = ::DestroyWindow(m_hWnd);
else
bResult = m_pCtrlSite->DestroyControl();
#endif //_AFX_NO_OCC_SUPPORT
// Note that 'this' may have been deleted at this point,
// (but only if pWnd != NULL)
if (pWnd != NULL)
{
// Should have been detached by OnNcDestroy
#ifdef _DEBUG
//////////////////////////////HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!///////////////////
ASSERT(pMap->LookupPermanent(hWndOrig) == NULL); //line 980
#endif
}
else
{
#ifdef _DEBUG
ASSERT(m_hWnd == hWndOrig);
#endif
// Detach after DestroyWindow called just in case
Detach();
}
return bResult;
}
你能給我們提供更多的信息嗎?就像錯誤信息的全文一樣? (另外,爲什麼當你在問題中提到VC++ 6.0時,這個標記爲VS 2005?) – 2011-02-07 14:40:08