Commit 98680070 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use QueryService helper function in SetClientSite implementation.

parent 6363796e
......@@ -203,19 +203,15 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
OLECMD cmd = {OLECMDID_SETPROGRESSTEXT, 0};
if(!hostui_setup) {
IServiceProvider *sp;
IDocObjectService *doc_object_service;
IBrowserService *browser_service;
IWebBrowser2 *wb;
V_VT(&var) = VT_UNKNOWN;
V_UNKNOWN(&var) = (IUnknown*)&This->window->IHTMLWindow2_iface;
IOleCommandTarget_Exec(cmdtrg, &CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0, &var, NULL);
hres = IOleClientSite_QueryInterface(pClientSite, &IID_IServiceProvider, (void**)&sp);
if(SUCCEEDED(hres)) {
IDocObjectService *doc_object_service;
IBrowserService *browser_service;
IWebBrowser2 *wb;
hres = IServiceProvider_QueryService(sp, &IID_IShellBrowser,
hres = do_query_service((IUnknown*)pClientSite, &IID_IShellBrowser,
&IID_IBrowserService, (void**)&browser_service);
if(SUCCEEDED(hres)) {
hres = IBrowserService_QueryInterface(browser_service,
......@@ -227,17 +223,14 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
* Some embedding routines, esp. in regards to use of IDocObjectService, differ if
* embedder supports IWebBrowserApp.
*/
hres = IServiceProvider_QueryService(sp, &IID_IWebBrowserApp, &IID_IWebBrowser2, (void**)&wb);
hres = do_query_service((IUnknown*)pClientSite, &IID_IWebBrowserApp, &IID_IWebBrowser2, (void**)&wb);
if(SUCCEEDED(hres)) {
This->doc_obj->is_webbrowser = TRUE;
IWebBrowser2_Release(wb);
}
}
IBrowserService_Release(browser_service);
}
IServiceProvider_Release(sp);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment