0
發生此是我在OnBtnClick功能編寫代碼運行時檢查失敗#0的時候我叫IHTMLDocument3 :: getElememntById功能MFC
CComPtr<IHTMLDocument3> pDoc3 = (IHTMLDocument3 *)m_webBrowser.get_Document();
CComPtr<IHTMLElement> pElem;
BSTR idTmp = CComBSTR(L"article_summary");
HRESULT hr = pDoc3->getElementById(idTmp, &pElem);
我試圖讓哪個ID是元素「article_sumary」...但我得到了這個
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function
call. This is usually a result of calling a function declared with one calling
convention with a function pointer declared with a different calling convention.
哇,這正是我剛纔所做的。我讀了Essntial COM,然後更改我的代碼...我只是COM的開端。運行時檢查失敗#0誤導我兩天! – 2012-07-28 16:36:54