IHTMLDocument2 TO IWebBrowser2

if(NULL != pIHTMLDocument2)
{
IHTMLWindow2* pIHTMLWindow2 = NULL;
hr = pIHTMLDocument2->get_parentWindow(&pIHTMLWindow2);
if((S_OK == hr) && (NULL != pIHTMLWindow2))
{
IServiceProvider* pISP = NULL;
hr = pIHTMLWindow2->QueryInterface(IID_IServiceProvider, (void**)& pISP);
if((S_OK == hr) && (NULL != pISP))
{
IWebBrowser2* pIWebBrowser2 = NULL;
hr = pISP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void**)& pIWebBrowser2);
if((S_OK == hr) && (NULL != pIWebBrowser2))
{
//…
}
pISP->Release();
}
pIHTMLWindow2->Release();
}
}

IHTMLDocument2 TO IWebBrowser2,布布扣,bubuko.com

IHTMLDocument2 TO IWebBrowser2

上一篇:php_socket尝试


下一篇:oracle性能优化:Linux环境下合理配置大内存页(HugePage)