static void release_client_site(WebBrowser *This, BOOL destroy_win) { release_dochost_client(&This->doc_host); if(This->client) { IOleClientSite_Release(This->client); This->client = NULL; } if(This->client_closed) { IOleClientSite_Release(This->client_closed); This->client_closed = NULL; } if(destroy_win && This->shell_embedding_hwnd) { DestroyWindow(This->shell_embedding_hwnd); This->shell_embedding_hwnd = NULL; } if(This->inplace) { IOleInPlaceSiteEx_Release(This->inplace); This->inplace = NULL; } if(This->container) { IOleContainer_Release(This->container); This->container = NULL; } if(This->uiwindow) { IOleInPlaceUIWindow_Release(This->uiwindow); This->uiwindow = NULL; } }
static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) { BindStatusCallback *This = impl_from_IBindStatusCallback(iface); TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError)); set_status_text(This, 0, emptyW); if(!This->doc_host) return S_OK; if(!This->doc_host->olecmd) notify_download_state(This->doc_host, FALSE); if(FAILED(hresult)) handle_navigation_error(This->doc_host, hresult, This->url, NULL); IOleClientSite_Release(&This->doc_host->IOleClientSite_iface); This->doc_host = NULL; IBinding_Release(This->binding); This->binding = NULL; return S_OK; }
static HRESULT WINAPI ControlSite_TranslateAccelerator(IOleControlSite *iface, MSG *pMsg, DWORD grfModifiers) { DocHost *This = impl_from_IOleControlSite(iface); IOleObject *wb_obj; IOleClientSite *clientsite; IOleControlSite *controlsite; HRESULT hr; TRACE("(%p)->(%p, %08x)\n", This, pMsg, grfModifiers); hr = IDispatch_QueryInterface(This->disp, &IID_IOleObject, (void**)&wb_obj); if(SUCCEEDED(hr)) { hr = IOleObject_GetClientSite(wb_obj, &clientsite); if(SUCCEEDED(hr)) { hr = IOleClientSite_QueryInterface(clientsite, &IID_IOleControlSite, (void**)&controlsite); if(SUCCEEDED(hr)) { hr = IOleControlSite_TranslateAccelerator(controlsite, pMsg, grfModifiers); IOleControlSite_Release(controlsite); } IOleClientSite_Release(clientsite); } IOleObject_Release(wb_obj); } if(FAILED(hr)) return S_FALSE; else return hr; }
void ME_DeleteReObject(REOBJECT* reo) { if (reo->poleobj) IOleObject_Release(reo->poleobj); if (reo->pstg) IStorage_Release(reo->pstg); if (reo->polesite) IOleClientSite_Release(reo->polesite); FREE_OBJ(reo); }
static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable, IMoniker *pimkName, LPBC pibc, DWORD grfMode) { HTMLDocument *This = impl_from_IPersistMoniker(iface); IMoniker *mon; HRESULT hres; TRACE("(%p)->(%x %p %p %08x)\n", This, fFullyAvailable, pimkName, pibc, grfMode); if(pibc) { IUnknown *unk = NULL; /* FIXME: * Use params: * "__PrecreatedObject" * "BIND_CONTEXT_PARAM" * "__HTMLLOADOPTIONS" * "__DWNBINDINFO" * "URL Context" * "_ITransData_Object_" * "_EnumFORMATETC_" */ hres = IBindCtx_GetObjectParam(pibc, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM, &unk); if(SUCCEEDED(hres) && unk) { IOleClientSite *client = NULL; hres = IUnknown_QueryInterface(unk, &IID_IOleClientSite, (void**)&client); if(SUCCEEDED(hres)) { TRACE("Got client site %p\n", client); IOleObject_SetClientSite(&This->IOleObject_iface, client); IOleClientSite_Release(client); } IUnknown_Release(unk); } } if(This->doc_obj->is_mhtml) { IUnknown *unk; hres = MimeOleObjectFromMoniker(0, pimkName, pibc, &IID_IUnknown, (void**)&unk, &mon); if(FAILED(hres)) return hres; IUnknown_Release(unk); pibc = NULL; }else { IMoniker_AddRef(mon = pimkName); } prepare_for_binding(This, mon, FALSE); call_docview_84(This->doc_obj); hres = set_moniker(This->window, mon, NULL, pibc, NULL, TRUE); IMoniker_Release(mon); if(FAILED(hres)) return hres; return start_binding(This->window->pending_window, (BSCallback*)This->window->pending_window->bscallback, pibc); }
void deactivate_document(DocHost *This) { IOleInPlaceObjectWindowless *winobj; IOleObject *oleobj = NULL; IHlinkTarget *hlink = NULL; HRESULT hres; if(This->doc_navigate) { IUnknown_Release(This->doc_navigate); This->doc_navigate = NULL; } if(This->is_prop_notif) advise_prop_notif(This, FALSE); if(This->view) IOleDocumentView_UIActivate(This->view, FALSE); hres = IUnknown_QueryInterface(This->document, &IID_IOleInPlaceObjectWindowless, (void**)&winobj); if(SUCCEEDED(hres)) { IOleInPlaceObjectWindowless_InPlaceDeactivate(winobj); IOleInPlaceObjectWindowless_Release(winobj); } if(This->view) { IOleDocumentView_Show(This->view, FALSE); IOleDocumentView_CloseView(This->view, 0); IOleDocumentView_SetInPlaceSite(This->view, NULL); IOleDocumentView_Release(This->view); This->view = NULL; } hres = IUnknown_QueryInterface(This->document, &IID_IOleObject, (void**)&oleobj); if(SUCCEEDED(hres)) IOleObject_Close(oleobj, OLECLOSE_NOSAVE); hres = IUnknown_QueryInterface(This->document, &IID_IHlinkTarget, (void**)&hlink); if(SUCCEEDED(hres)) { IHlinkTarget_SetBrowseContext(hlink, NULL); IHlinkTarget_Release(hlink); } if(oleobj) { IOleClientSite *client_site = NULL; IOleObject_GetClientSite(oleobj, &client_site); if(client_site) { if(client_site == &This->IOleClientSite_iface) IOleObject_SetClientSite(oleobj, NULL); IOleClientSite_Release(client_site); } IOleObject_Release(oleobj); } IUnknown_Release(This->document); This->document = NULL; }
static ULONG WINAPI NewWindowManager_Release(INewWindowManager *iface) { NewWindowManager *This = impl_from_INewWindowManager(iface); TRACE("(%p)\n", This); return IOleClientSite_Release(&This->doc_host->IOleClientSite_iface); }
static void release_client_site(WindowsMediaPlayer *This) { if(!This->client_site) return; if(This->hwnd) deactivate_window(This); IOleClientSite_Release(This->client_site); This->client_site = NULL; }
static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) { BindStatusCallback *This = impl_from_IBindStatusCallback(iface); TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError)); set_status_text(This, emptyW); if(This->doc_host) { IOleClientSite_Release(&This->doc_host->IOleClientSite_iface); This->doc_host = NULL; } return S_OK; }
static ULONG WINAPI IRichEditOle_fnRelease(IRichEditOle *me) { IRichEditOleImpl *This = impl_from_IRichEditOle(me); ULONG ref = InterlockedDecrement(&This->ref); TRACE ("%p ref=%u\n", This, ref); if (!ref) { TRACE ("Destroying %p\n", This); This->txtSel->reOle = NULL; ITextSelection_Release(&This->txtSel->ITextSelection_iface); IOleClientSite_Release(&This->clientSite->IOleClientSite_iface); heap_free(This); } return ref; }
static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) { BindStatusCallback *This = impl_from_IBindStatusCallback(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); if(!ref) { if(This->doc_host) IOleClientSite_Release(&This->doc_host->IOleClientSite_iface); if(This->post_data) GlobalFree(This->post_data); SysFreeString(This->headers); heap_free(This->url); heap_free(This); } return ref; }
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg, LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { WebBrowser *This = impl_from_IOleObject(iface); TRACE("(%p)->(%d %p %p %d %p %s)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, wine_dbgstr_rect(lprcPosRect)); /* restore closed client site if we have one */ if(!This->client && This->client_closed) { IOleClientSite *client = This->client_closed; This->client_closed = NULL; IOleObject_SetClientSite(iface, client); IOleClientSite_Release(client); } switch (iVerb) { case OLEIVERB_SHOW: TRACE("OLEIVERB_SHOW\n"); return activate_ui(This, pActiveSite); case OLEIVERB_UIACTIVATE: TRACE("OLEIVERB_UIACTIVATE\n"); return activate_ui(This, pActiveSite); case OLEIVERB_INPLACEACTIVATE: TRACE("OLEIVERB_INPLACEACTIVATE\n"); return activate_inplace(This, pActiveSite); case OLEIVERB_HIDE: TRACE("OLEIVERB_HIDE\n"); if(This->inplace) IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace); if(This->shell_embedding_hwnd) ShowWindow(This->shell_embedding_hwnd, SW_HIDE); return S_OK; default: FIXME("stub for %d\n", iVerb); break; } return E_NOTIMPL; }
void ReleaseWebBrowser(HHInfo *info) { WebBrowserContainer *container = info->web_browser; HRESULT hres; if(!container) return; if(container->ole_obj) { IOleInPlaceSite *inplace; hres = IOleObject_QueryInterface(container->ole_obj, &IID_IOleInPlaceSite, (void**)&inplace); if(SUCCEEDED(hres)) { IOleInPlaceSite_OnInPlaceDeactivate(inplace); IOleInPlaceSite_Release(inplace); } IOleObject_SetClientSite(container->ole_obj, NULL); } info->web_browser = NULL; IOleClientSite_Release(&container->IOleClientSite_iface); }
static ULONG STDMETHODCALLTYPE Frame_Release(IOleInPlaceFrame *iface) { WebBrowserContainer *This = impl_from_IOleInPlaceFrame(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG STDMETHODCALLTYPE UI_Release(IDocHostUIHandler * iface) { WebBrowserContainer *This = impl_from_IDocHostUIHandler(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG WINAPI ClDispatch_Release(IDispatch *iface) { DocHost *This = impl_from_IDispatch(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG WINAPI ClOleCommandTarget_Release(IOleCommandTarget *iface) { DocHost *This = impl_from_IOleCommandTarget(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite) { HTMLDocument *This = impl_from_IOleObject(iface); IOleCommandTarget *cmdtrg = NULL; IOleWindow *ole_window; IBrowserService *browser_service; BOOL hostui_setup; VARIANT silent; HWND hwnd; HRESULT hres; TRACE("(%p)->(%p)\n", This, pClientSite); if(pClientSite == This->doc_obj->client) return S_OK; if(This->doc_obj->client) { IOleClientSite_Release(This->doc_obj->client); This->doc_obj->client = NULL; This->doc_obj->usermode = UNKNOWN_USERMODE; } if(This->doc_obj->client_cmdtrg) { IOleCommandTarget_Release(This->doc_obj->client_cmdtrg); This->doc_obj->client_cmdtrg = NULL; } if(This->doc_obj->hostui && !This->doc_obj->custom_hostui) { IDocHostUIHandler_Release(This->doc_obj->hostui); This->doc_obj->hostui = NULL; } if(This->doc_obj->doc_object_service) { IDocObjectService_Release(This->doc_obj->doc_object_service); This->doc_obj->doc_object_service = NULL; } if(This->doc_obj->webbrowser) { IUnknown_Release(This->doc_obj->webbrowser); This->doc_obj->webbrowser = NULL; } if(This->doc_obj->browser_service) { IUnknown_Release(This->doc_obj->browser_service); This->doc_obj->browser_service = NULL; } if(This->doc_obj->travel_log) { ITravelLog_Release(This->doc_obj->travel_log); This->doc_obj->travel_log = NULL; } memset(&This->doc_obj->hostinfo, 0, sizeof(DOCHOSTUIINFO)); if(!pClientSite) return S_OK; IOleClientSite_AddRef(pClientSite); This->doc_obj->client = pClientSite; hostui_setup = This->doc_obj->hostui_setup; if(!This->doc_obj->hostui) { IDocHostUIHandler *uihandler; This->doc_obj->custom_hostui = FALSE; hres = IOleClientSite_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&uihandler); if(SUCCEEDED(hres)) This->doc_obj->hostui = uihandler; } if(This->doc_obj->hostui) { DOCHOSTUIINFO hostinfo; LPOLESTR key_path = NULL, override_key_path = NULL; IDocHostUIHandler2 *uihandler2; memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO)); hostinfo.cbSize = sizeof(DOCHOSTUIINFO); hres = IDocHostUIHandler_GetHostInfo(This->doc_obj->hostui, &hostinfo); if(SUCCEEDED(hres)) { TRACE("hostinfo = {%u %08x %08x %s %s}\n", hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick, debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS)); update_hostinfo(This->doc_obj, &hostinfo); This->doc_obj->hostinfo = hostinfo; } if(!hostui_setup) { hres = IDocHostUIHandler_GetOptionKeyPath(This->doc_obj->hostui, &key_path, 0); if(hres == S_OK && key_path) { if(key_path[0]) { /* FIXME: use key_path */ FIXME("key_path = %s\n", debugstr_w(key_path)); } CoTaskMemFree(key_path); } hres = IDocHostUIHandler_QueryInterface(This->doc_obj->hostui, &IID_IDocHostUIHandler2, (void**)&uihandler2); if(SUCCEEDED(hres)) { hres = IDocHostUIHandler2_GetOverrideKeyPath(uihandler2, &override_key_path, 0); if(hres == S_OK && override_key_path) { if(override_key_path[0]) { /*FIXME: use override_key_path */ FIXME("override_key_path = %s\n", debugstr_w(override_key_path)); } CoTaskMemFree(override_key_path); } IDocHostUIHandler2_Release(uihandler2); } This->doc_obj->hostui_setup = TRUE; } } load_settings(This->doc_obj); /* Native calls here GetWindow. What is it for? * We don't have anything to do with it here (yet). */ hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleWindow, (void**)&ole_window); if(SUCCEEDED(hres)) { IOleWindow_GetWindow(ole_window, &hwnd); IOleWindow_Release(ole_window); } hres = do_query_service((IUnknown*)pClientSite, &IID_IShellBrowser, &IID_IBrowserService, (void**)&browser_service); if(SUCCEEDED(hres)) { ITravelLog *travel_log; This->doc_obj->browser_service = (IUnknown*)browser_service; hres = IBrowserService_GetTravelLog(browser_service, &travel_log); if(SUCCEEDED(hres)) This->doc_obj->travel_log = travel_log; }else { browser_service = NULL; } hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleCommandTarget, (void**)&cmdtrg); if(SUCCEEDED(hres)) { VARIANT var; OLECMD cmd = {OLECMDID_SETPROGRESSTEXT, 0}; This->doc_obj->client_cmdtrg = cmdtrg; if(!hostui_setup) { IDocObjectService *doc_object_service; IWebBrowser2 *wb; set_document_navigation(This->doc_obj, TRUE); if(browser_service) { hres = IBrowserService_QueryInterface(browser_service, &IID_IDocObjectService, (void**)&doc_object_service); if(SUCCEEDED(hres)) { This->doc_obj->doc_object_service = doc_object_service; /* * Some embedding routines, esp. in regards to use of IDocObjectService, differ if * embedder supports IWebBrowserApp. */ hres = do_query_service((IUnknown*)pClientSite, &IID_IWebBrowserApp, &IID_IWebBrowser2, (void**)&wb); if(SUCCEEDED(hres)) This->doc_obj->webbrowser = (IUnknown*)wb; } } } call_docview_84(This->doc_obj); IOleCommandTarget_QueryStatus(cmdtrg, NULL, 1, &cmd, NULL); V_VT(&var) = VT_I4; V_I4(&var) = 0; IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSMAX, OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL); IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL); } if(This->doc_obj->usermode == UNKNOWN_USERMODE) IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_USERMODE); IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_OFFLINEIFNOTCONNECTED); hres = get_client_disp_property(This->doc_obj->client, DISPID_AMBIENT_SILENT, &silent); if(SUCCEEDED(hres)) { if(V_VT(&silent) != VT_BOOL) WARN("silent = %s\n", debugstr_variant(&silent)); else if(V_BOOL(&silent)) FIXME("silent == true\n"); } IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_USERAGENT); IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_PALETTE); return S_OK; }
static ULONG WINAPI OleDocumentSite_Release(IOleDocumentSite *iface) { DocHost *This = DOCSITE_THIS(iface); return IOleClientSite_Release(CLIENTSITE(This)); }
static void test_oleobject(void) { DWORD status, dpi_x, dpi_y; IOleClientSite *site; IOleObject *obj; SIZEL extent; HRESULT hr; HDC hdc; hr = CoCreateInstance(&CLSID_ScriptControl, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void**)&obj); ok(hr == S_OK, "got 0x%08x\n", hr); if (0) /* crashes on w2k3 */ hr = IOleObject_GetMiscStatus(obj, DVASPECT_CONTENT, NULL); status = 0; hr = IOleObject_GetMiscStatus(obj, DVASPECT_CONTENT, &status); ok(hr == S_OK, "got 0x%08x\n", hr); ok(status != 0, "got 0x%08x\n", status); hr = IOleObject_SetClientSite(obj, &testclientsite); ok(hr == S_OK, "got 0x%08x\n", hr); if (0) /* crashes on w2k3 */ hr = IOleObject_GetClientSite(obj, NULL); hr = IOleObject_GetClientSite(obj, &site); ok(hr == S_OK, "got 0x%08x\n", hr); ok(site == &testclientsite, "got %p, %p\n", site, &testclientsite); IOleClientSite_Release(site); hr = IOleObject_SetClientSite(obj, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IOleObject_GetClientSite(obj, &site); ok(hr == S_OK, "got 0x%08x\n", hr); ok(site == NULL, "got %p\n", site); /* extents */ hdc = GetDC(0); dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); ReleaseDC(0, hdc); memset(&extent, 0, sizeof(extent)); hr = IOleObject_GetExtent(obj, DVASPECT_CONTENT, &extent); ok(hr == S_OK, "got 0x%08x\n", hr); ok(extent.cx == MulDiv(38, 2540, dpi_x), "got %d\n", extent.cx); ok(extent.cy == MulDiv(38, 2540, dpi_y), "got %d\n", extent.cy); extent.cx = extent.cy = 0xdeadbeef; hr = IOleObject_GetExtent(obj, DVASPECT_THUMBNAIL, &extent); ok(hr == DV_E_DVASPECT, "got 0x%08x\n", hr); ok(extent.cx == 0xdeadbeef, "got %d\n", extent.cx); ok(extent.cy == 0xdeadbeef, "got %d\n", extent.cy); extent.cx = extent.cy = 0xdeadbeef; hr = IOleObject_GetExtent(obj, DVASPECT_ICON, &extent); ok(hr == DV_E_DVASPECT, "got 0x%08x\n", hr); ok(extent.cx == 0xdeadbeef, "got %d\n", extent.cx); ok(extent.cy == 0xdeadbeef, "got %d\n", extent.cy); extent.cx = extent.cy = 0xdeadbeef; hr = IOleObject_GetExtent(obj, DVASPECT_DOCPRINT, &extent); ok(hr == DV_E_DVASPECT, "got 0x%08x\n", hr); ok(extent.cx == 0xdeadbeef, "got %d\n", extent.cx); ok(extent.cy == 0xdeadbeef, "got %d\n", extent.cy); IOleObject_Release(obj); }
static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface) { DocHost *This = impl_from_IOleInPlaceFrame(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) { DocHost *This = impl_from_IPropertyNotifySink(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface) { DocHost *This = impl_from_IDocHostUIHandler2(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG WINAPI ClDispatch_Release(IDispatch *iface) { DocHost *This = DISP_THIS(iface); return IOleClientSite_Release(CLIENTSITE(This)); }
static ULONG WINAPI ControlSite_Release(IOleControlSite *iface) { DocHost *This = impl_from_IOleControlSite(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }
static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface) { DocHost *This = SERVPROV_THIS(iface); return IOleClientSite_Release(CLIENTSITE(This)); }
static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) { DocHost *This = PROPNOTIF_THIS(iface); return IOleClientSite_Release(CLIENTSITE(This)); }
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite) { WebBrowser *This = OLEOBJ_THIS(iface); IOleContainer *container; HRESULT hres; TRACE("(%p)->(%p)\n", This, pClientSite); if(This->client == pClientSite) return S_OK; if(This->doc_host.hwnd) { DestroyWindow(This->doc_host.hwnd); This->doc_host.hwnd = NULL; } if(This->shell_embedding_hwnd) { DestroyWindow(This->shell_embedding_hwnd); This->shell_embedding_hwnd = NULL; } if(This->inplace) { IOleInPlaceSite_Release(This->inplace); This->inplace = NULL; } if(This->doc_host.hostui) IDocHostUIHandler_Release(This->doc_host.hostui); if(This->client) IOleClientSite_Release(This->client); if(!pClientSite) { if(This->doc_host.document) deactivate_document(&This->doc_host); This->client = NULL; return S_OK; } This->client = pClientSite; IOleClientSite_AddRef(pClientSite); hres = IOleClientSite_QueryInterface(This->client, &IID_IDocHostUIHandler, (void**)&This->doc_host.hostui); if(FAILED(hres)) This->doc_host.hostui = NULL; hres = IOleClientSite_GetContainer(This->client, &container); if(SUCCEEDED(hres)) { ITargetContainer *target_container; hres = IOleContainer_QueryInterface(container, &IID_ITargetContainer, (void**)&target_container); if(SUCCEEDED(hres)) { FIXME("Unsupported ITargetContainer\n"); ITargetContainer_Release(target_container); } IOleContainer_Release(container); } create_shell_embedding_hwnd(This); return S_OK; }
static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface) { DocHost *This = INPLACESITE_THIS(iface); return IOleClientSite_Release(CLIENTSITE(This)); }
static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface) { DocHost *This = impl_from_IServiceProvider(iface); return IOleClientSite_Release(&This->IOleClientSite_iface); }