本文整理汇总了C++中IOleClientSite_Release函数的典型用法代码示例。如果您正苦于以下问题:C++ IOleClientSite_Release函数的具体用法?C++ IOleClientSite_Release怎么用?C++ IOleClientSite_Release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IOleClientSite_Release函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: release_client_site
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;
}
}
示例2: BindStatusCallback_OnStopBinding
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;
}
示例3: ControlSite_TranslateAccelerator
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;
}
示例4: ME_DeleteReObject
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);
}
示例5: PersistMoniker_Load
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);
}
示例6: deactivate_document
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;
}
示例7: NewWindowManager_Release
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);
}
示例8: release_client_site
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;
}
示例9: BindStatusCallback_OnStopBinding
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;
}
示例10: IRichEditOle_fnRelease
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;
}
示例11: BindStatusCallback_Release
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;
}
示例12: OleObject_DoVerb
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;
}
示例13: ReleaseWebBrowser
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);
}
示例14: Frame_Release
static ULONG STDMETHODCALLTYPE Frame_Release(IOleInPlaceFrame *iface)
{
WebBrowserContainer *This = impl_from_IOleInPlaceFrame(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface);
}
示例15: UI_Release
static ULONG STDMETHODCALLTYPE UI_Release(IDocHostUIHandler * iface)
{
WebBrowserContainer *This = impl_from_IDocHostUIHandler(iface);
return IOleClientSite_Release(&This->IOleClientSite_iface);
}