static void release_client_site(WebBrowser *This) { release_dochost_client(&This->doc_host); 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->container) { IOleContainer_Release(This->container); This->container = NULL; } if(This->uiwindow) { IOleInPlaceUIWindow_Release(This->uiwindow); This->uiwindow = NULL; } if(This->client) { IOleClientSite_Release(This->client); This->client = NULL; } }
static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow) { HTMLDocument *This = DOCVIEW_THIS(iface); HRESULT hres; TRACE("(%p)->(%x)\n", This, fShow); if(fShow) { if(!This->doc_obj->ui_active) { hres = activate_window(This->doc_obj); if(FAILED(hres)) return hres; } update_doc(This, UPDATE_UI); ShowWindow(This->doc_obj->hwnd, SW_SHOW); }else { ShowWindow(This->doc_obj->hwnd, SW_HIDE); if(This->doc_obj->in_place_active) IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(This)); if(This->doc_obj->ip_window) { IOleInPlaceUIWindow_Release(This->doc_obj->ip_window); This->doc_obj->ip_window = NULL; } } return S_OK; }
void WebBrowser_OleObject_Destroy(WebBrowser *This) { if(This->client) IOleObject_SetClientSite(OLEOBJ(This), NULL); if(This->container) IOleContainer_Release(This->container); if(This->frame) IOleInPlaceFrame_Release(This->frame); if(This->uiwindow) IOleInPlaceUIWindow_Release(This->uiwindow); }
static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, RECT *lprcPosRect, RECT *lprcClipRect, OLEINPLACEFRAMEINFO *frame_info) { PluginHost *This = impl_from_IOleInPlaceSiteEx(iface); IOleInPlaceUIWindow *ip_window; IOleInPlaceFrame *ip_frame; RECT pr, cr; HRESULT hres; TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect, lprcClipRect, frame_info); if(!This->doc || !This->doc->basedoc.doc_obj || !This->doc->basedoc.doc_obj->ipsite) { FIXME("No ipsite\n"); return E_UNEXPECTED; } hres = IOleInPlaceSite_GetWindowContext(This->doc->basedoc.doc_obj->ipsite, &ip_frame, &ip_window, &pr, &cr, frame_info); if(FAILED(hres)) { WARN("GetWindowContext failed: %08x\n", hres); return hres; } if(ip_window) IOleInPlaceUIWindow_Release(ip_window); if(ip_frame) IOleInPlaceFrame_Release(ip_frame); hres = create_ip_frame(&ip_frame); if(FAILED(hres)) return hres; hres = create_ip_window(ppDoc); if(FAILED(hres)) return hres; *ppFrame = ip_frame; *lprcPosRect = This->rect; *lprcClipRect = This->rect; return S_OK; }