From 9114827e7ecf7ad6dd35fed92a830aa0f9f63fb8 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 27 Jul 2012 11:00:34 +0200 Subject: [PATCH] ieframe: Use proper helpers for iface calls. --- dlls/ieframe/classinfo.c | 6 +++--- dlls/ieframe/client.c | 2 +- dlls/ieframe/ie.c | 6 +++--- dlls/ieframe/iexplore.c | 4 ++-- dlls/ieframe/intshcut.c | 2 +- dlls/ieframe/oleobject.c | 44 +++++++++++++++++++------------------- dlls/ieframe/persist.c | 18 ++++++++-------- dlls/ieframe/taskbarlist.c | 2 +- dlls/ieframe/urlhist.c | 2 +- dlls/ieframe/webbrowser.c | 20 ++++++++--------- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/dlls/ieframe/classinfo.c b/dlls/ieframe/classinfo.c index 72798d6c7c8..3fa77bb6cec 100644 --- a/dlls/ieframe/classinfo.c +++ b/dlls/ieframe/classinfo.c @@ -37,19 +37,19 @@ static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo2 *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IProvideClassInfo2(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); } static ULONG WINAPI ProvideClassInfo_AddRef(IProvideClassInfo2 *iface) { WebBrowser *This = impl_from_IProvideClassInfo2(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI ProvideClassInfo_Release(IProvideClassInfo2 *iface) { WebBrowser *This = impl_from_IProvideClassInfo2(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideClassInfo2 *iface, ITypeInfo **ppTI) diff --git a/dlls/ieframe/client.c b/dlls/ieframe/client.c index dd1d9db781d..c8fee31fcdd 100644 --- a/dlls/ieframe/client.c +++ b/dlls/ieframe/client.c @@ -81,7 +81,7 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri return E_NOINTERFACE; } - IOleClientSite_AddRef((IUnknown*)*ppv); + IUnknown_AddRef((IUnknown*)*ppv); return S_OK; } diff --git a/dlls/ieframe/ie.c b/dlls/ieframe/ie.c index c7357e994b0..02d0c2827d8 100644 --- a/dlls/ieframe/ie.c +++ b/dlls/ieframe/ie.c @@ -712,19 +712,19 @@ static HRESULT WINAPI IEServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppv) { InternetExplorer *This = impl_from_IServiceProvider(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); } static ULONG WINAPI IEServiceProvider_AddRef(IServiceProvider *iface) { InternetExplorer *This = impl_from_IServiceProvider(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI IEServiceProvider_Release(IServiceProvider *iface) { InternetExplorer *This = impl_from_IServiceProvider(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI IEServiceProvider_QueryService(IServiceProvider *iface, diff --git a/dlls/ieframe/iexplore.c b/dlls/ieframe/iexplore.c index 91337c4b94b..00150a44b8f 100644 --- a/dlls/ieframe/iexplore.c +++ b/dlls/ieframe/iexplore.c @@ -190,7 +190,7 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) res = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_INPROC_SERVER, &IID_IUniformResourceLocatorW, (PVOID*)&urlobj); if(SUCCEEDED(res)) - res = IUnknown_QueryInterface(urlobj, &IID_IPersistFile, (PVOID*)&urlfile); + res = IUnknown_QueryInterface((IUnknown*)urlobj, &IID_IPersistFile, (PVOID*)&urlfile); if(SUCCEEDED(res)) { @@ -243,7 +243,7 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) IPersistFile_Release(urlfile); if(urlobj) - IUnknown_Release(urlobj); + IUnknown_Release((IUnknown*)urlobj); FindClose(findhandle); } diff --git a/dlls/ieframe/intshcut.c b/dlls/ieframe/intshcut.c index 17a13ec74ab..7107a0ada47 100644 --- a/dlls/ieframe/intshcut.c +++ b/dlls/ieframe/intshcut.c @@ -834,7 +834,7 @@ static InternetShortcut *create_shortcut(void) heap_free(newshortcut); return NULL; } - IPropertySetStorage_Release(dummy); + IPropertyStorage_Release(dummy); } return newshortcut; diff --git a/dlls/ieframe/oleobject.c b/dlls/ieframe/oleobject.c index caef72d9c2a..0bcf1635ae7 100644 --- a/dlls/ieframe/oleobject.c +++ b/dlls/ieframe/oleobject.c @@ -131,24 +131,24 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site) return hres; } - hres = IOleInPlaceSite_CanInPlaceActivate(This->inplace); + hres = IOleInPlaceSiteEx_CanInPlaceActivate(This->inplace); if(hres != S_OK) { WARN("CanInPlaceActivate returned: %08x\n", hres); - IOleInPlaceSite_Release(This->inplace); + IOleInPlaceSiteEx_Release(This->inplace); This->inplace = NULL; return E_FAIL; } - hres = IOleInPlaceSite_GetWindow(This->inplace, &parent_hwnd); + hres = IOleInPlaceSiteEx_GetWindow(This->inplace, &parent_hwnd); if(SUCCEEDED(hres)) SHSetParentHwnd(This->shell_embedding_hwnd, parent_hwnd); - IOleInPlaceSite_OnInPlaceActivate(This->inplace); + IOleInPlaceSiteEx_OnInPlaceActivate(This->inplace); This->frameinfo.cb = sizeof(OLEINPLACEFRAMEINFO); - IOleInPlaceSite_GetWindowContext(This->inplace, &This->doc_host.frame, &This->uiwindow, - &This->pos_rect, &This->clip_rect, - &This->frameinfo); + IOleInPlaceSiteEx_GetWindowContext(This->inplace, &This->doc_host.frame, &This->uiwindow, + &This->pos_rect, &This->clip_rect, + &This->frameinfo); SetWindowPos(This->shell_embedding_hwnd, NULL, This->pos_rect.left, This->pos_rect.top, @@ -192,7 +192,7 @@ static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site) if(FAILED(hres)) return hres; - IOleInPlaceSite_OnUIActivate(This->inplace); + IOleInPlaceSiteEx_OnUIActivate(This->inplace); if(This->doc_host.frame) IOleInPlaceFrame_SetActiveObject(This->doc_host.frame, &This->IOleInPlaceActiveObject_iface, wszitem); @@ -270,7 +270,7 @@ static void release_client_site(WebBrowser *This) } if(This->inplace) { - IOleInPlaceSite_Release(This->inplace); + IOleInPlaceSiteEx_Release(This->inplace); This->inplace = NULL; } @@ -398,19 +398,19 @@ static inline WebBrowser *impl_from_IOleObject(IOleObject *iface) static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv) { WebBrowser *This = impl_from_IOleObject(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); } static ULONG WINAPI OleObject_AddRef(IOleObject *iface) { WebBrowser *This = impl_from_IOleObject(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI OleObject_Release(IOleObject *iface) { WebBrowser *This = impl_from_IOleObject(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite) @@ -514,8 +514,8 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption) IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, NULL, NULL); if(This->inplace) { - IOleInPlaceSite_OnUIDeactivate(This->inplace, FALSE); - IOleInPlaceSite_OnInPlaceDeactivate(This->inplace); + IOleInPlaceSiteEx_OnUIDeactivate(This->inplace, FALSE); + IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace); } return IOleObject_SetClientSite(iface, NULL); @@ -574,7 +574,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tag case OLEIVERB_HIDE: TRACE("OLEIVERB_HIDE\n"); if(This->inplace) - IOleInPlaceSite_OnInPlaceDeactivate(This->inplace); + IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace); if(This->shell_embedding_hwnd) ShowWindow(This->shell_embedding_hwnd, SW_HIDE); return S_OK; @@ -737,19 +737,19 @@ static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IOleInPlaceObject(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); } static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObject *iface) { WebBrowser *This = impl_from_IOleInPlaceObject(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObject *iface) { WebBrowser *This = impl_from_IOleInPlaceObject(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObject *iface, HWND* phwnd) @@ -776,7 +776,7 @@ static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObject *ifac FIXME("(%p)\n", This); if(This->inplace) { - IOleInPlaceSite_Release(This->inplace); + IOleInPlaceSiteEx_Release(This->inplace); This->inplace = NULL; } @@ -846,19 +846,19 @@ static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IOleControl(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); } static ULONG WINAPI OleControl_AddRef(IOleControl *iface) { WebBrowser *This = impl_from_IOleControl(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI OleControl_Release(IOleControl *iface) { WebBrowser *This = impl_from_IOleControl(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, LPCONTROLINFO pCI) diff --git a/dlls/ieframe/persist.c b/dlls/ieframe/persist.c index 35290237b2b..4c890d7ebfa 100644 --- a/dlls/ieframe/persist.c +++ b/dlls/ieframe/persist.c @@ -38,19 +38,19 @@ static HRESULT WINAPI PersistStorage_QueryInterface(IPersistStorage *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IPersistStorage(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); } static ULONG WINAPI PersistStorage_AddRef(IPersistStorage *iface) { WebBrowser *This = impl_from_IPersistStorage(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI PersistStorage_Release(IPersistStorage *iface) { WebBrowser *This = impl_from_IPersistStorage(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI PersistStorage_GetClassID(IPersistStorage *iface, CLSID *pClassID) @@ -122,19 +122,19 @@ static HRESULT WINAPI PersistMemory_QueryInterface(IPersistMemory *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IPersistMemory(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); } static ULONG WINAPI PersistMemory_AddRef(IPersistMemory *iface) { WebBrowser *This = impl_from_IPersistMemory(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI PersistMemory_Release(IPersistMemory *iface) { WebBrowser *This = impl_from_IPersistMemory(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI PersistMemory_GetClassID(IPersistMemory *iface, CLSID *pClassID) @@ -206,19 +206,19 @@ static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IPersistStreamInit(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); } static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface) { WebBrowser *This = impl_from_IPersistStreamInit(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface) { WebBrowser *This = impl_from_IPersistStreamInit(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID) diff --git a/dlls/ieframe/taskbarlist.c b/dlls/ieframe/taskbarlist.c index 72ae4dfb1ca..f4323176542 100644 --- a/dlls/ieframe/taskbarlist.c +++ b/dlls/ieframe/taskbarlist.c @@ -47,7 +47,7 @@ static HRESULT STDMETHODCALLTYPE taskbar_list_QueryInterface(ITaskbarList4 *ifac IsEqualGUID(riid, &IID_ITaskbarList4) || IsEqualGUID(riid, &IID_IUnknown)) { - IUnknown_AddRef(iface); + ITaskbarList4_AddRef(iface); *object = iface; return S_OK; } diff --git a/dlls/ieframe/urlhist.c b/dlls/ieframe/urlhist.c index 157138c5183..d963d9517c2 100644 --- a/dlls/ieframe/urlhist.c +++ b/dlls/ieframe/urlhist.c @@ -128,5 +128,5 @@ HRESULT WINAPI CUrlHistory_Create(IClassFactory *iface, IUnknown *pOuter, REFIID if(pOuter) return CLASS_E_NOAGGREGATION; - return IUrlHistoryStg_QueryInterface(&UrlHistoryStg2, riid, ppv); + return IUrlHistoryStg2_QueryInterface(&UrlHistoryStg2, riid, ppv); } diff --git a/dlls/ieframe/webbrowser.c b/dlls/ieframe/webbrowser.c index 033cda8ae00..b82233bacfc 100644 --- a/dlls/ieframe/webbrowser.c +++ b/dlls/ieframe/webbrowser.c @@ -405,7 +405,7 @@ static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, LONG Left) /* We don't really change the window position here. * We just notify the embedder that he should do so. */ - return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect); + return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect); } static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser2 *iface, LONG *pl) @@ -433,7 +433,7 @@ static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, LONG Top) /* We don't really change the window position here. * We just notify the embedder that he should do so. */ - return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect); + return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect); } static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser2 *iface, LONG *pl) @@ -461,7 +461,7 @@ static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, LONG Width) /* We don't really change the window size here. * We just notify the embedder that he should do so. */ - return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect); + return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect); } static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser2 *iface, LONG *pl) @@ -489,7 +489,7 @@ static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, LONG Height) /* We don't really change the window size here. * We just notify the embedder that he should do so. */ - return IOleInPlaceSite_OnPosRectChange(This->inplace, &rect); + return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect); } static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName) @@ -801,7 +801,7 @@ static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmd } if (!target && This->doc_host.document) { - hres = IOleContainer_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target); + hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target); if(FAILED(hres)) target = NULL; } @@ -839,7 +839,7 @@ static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID, } if(!target && This->doc_host.document) { - hres = IOleContainer_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target); + hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target); if(FAILED(hres)) target = NULL; } @@ -1123,19 +1123,19 @@ static HRESULT WINAPI WBServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppv) { WebBrowser *This = impl_from_IServiceProvider(iface); - return IWebBrowser_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); + return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); } static ULONG WINAPI WBServiceProvider_AddRef(IServiceProvider *iface) { WebBrowser *This = impl_from_IServiceProvider(iface); - return IWebBrowser_AddRef(&This->IWebBrowser2_iface); + return IWebBrowser2_AddRef(&This->IWebBrowser2_iface); } static ULONG WINAPI WBServiceProvider_Release(IServiceProvider *iface) { WebBrowser *This = impl_from_IServiceProvider(iface); - return IWebBrowser_Release(&This->IWebBrowser2_iface); + return IWebBrowser2_Release(&This->IWebBrowser2_iface); } static HRESULT STDMETHODCALLTYPE WBServiceProvider_QueryService(IServiceProvider *iface, @@ -1269,7 +1269,7 @@ static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void lock_module(); - hres = IWebBrowser_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv); + hres = IWebBrowser2_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv); IWebBrowser2_Release(&ret->IWebBrowser2_iface); return hres;