首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

IHTMLDocument2赋值失败解决办法

2013-02-15 
IHTMLDocument2赋值失败本帖最后由 dm569263708 于 2012-12-19 09:57:33 编辑CComPtrIDispatch spDispDo

IHTMLDocument2赋值失败
本帖最后由 dm569263708 于 2012-12-19 09:57:33 编辑


CComPtr<IDispatch> spDispDoc;
hr=spBrowser->get_Document(&spDispDoc);   
if (FAILED(hr)) continue; 

CComQIPtr<IHTMLDocument2>spDocument2 =spDispDoc;   


测试时唯独网页为xsl,spDocument2 =spDispDoc的赋值会失败,在线等答案
[解决办法]
pDispDoc->QueryInterface(IID_IHTMLDocument2, (void**) &spDocument2))
[解决办法]
既然网页为xsl时失败,那就检查返回的错误值是什么

热点排行