ieframe: Use proper helpers for iface calls.

This commit is contained in:
Jacek Caban 2012-07-27 11:00:34 +02:00 committed by Alexandre Julliard
parent 16871c4c89
commit 9114827e7e
10 changed files with 53 additions and 53 deletions

View File

@ -37,19 +37,19 @@ static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo2 *iface,
REFIID riid, LPVOID *ppobj) REFIID riid, LPVOID *ppobj)
{ {
WebBrowser *This = impl_from_IProvideClassInfo2(iface); 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) static ULONG WINAPI ProvideClassInfo_AddRef(IProvideClassInfo2 *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI ProvideClassInfo_Release(IProvideClassInfo2 *iface)
{ {
WebBrowser *This = impl_from_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) static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideClassInfo2 *iface, ITypeInfo **ppTI)

View File

@ -81,7 +81,7 @@ static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID ri
return E_NOINTERFACE; return E_NOINTERFACE;
} }
IOleClientSite_AddRef((IUnknown*)*ppv); IUnknown_AddRef((IUnknown*)*ppv);
return S_OK; return S_OK;
} }

View File

@ -712,19 +712,19 @@ static HRESULT WINAPI IEServiceProvider_QueryInterface(IServiceProvider *iface,
REFIID riid, LPVOID *ppv) REFIID riid, LPVOID *ppv)
{ {
InternetExplorer *This = impl_from_IServiceProvider(iface); 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) static ULONG WINAPI IEServiceProvider_AddRef(IServiceProvider *iface)
{ {
InternetExplorer *This = impl_from_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) static ULONG WINAPI IEServiceProvider_Release(IServiceProvider *iface)
{ {
InternetExplorer *This = impl_from_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, static HRESULT WINAPI IEServiceProvider_QueryService(IServiceProvider *iface,

View File

@ -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); res = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_INPROC_SERVER, &IID_IUniformResourceLocatorW, (PVOID*)&urlobj);
if(SUCCEEDED(res)) if(SUCCEEDED(res))
res = IUnknown_QueryInterface(urlobj, &IID_IPersistFile, (PVOID*)&urlfile); res = IUnknown_QueryInterface((IUnknown*)urlobj, &IID_IPersistFile, (PVOID*)&urlfile);
if(SUCCEEDED(res)) if(SUCCEEDED(res))
{ {
@ -243,7 +243,7 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
IPersistFile_Release(urlfile); IPersistFile_Release(urlfile);
if(urlobj) if(urlobj)
IUnknown_Release(urlobj); IUnknown_Release((IUnknown*)urlobj);
FindClose(findhandle); FindClose(findhandle);
} }

View File

@ -834,7 +834,7 @@ static InternetShortcut *create_shortcut(void)
heap_free(newshortcut); heap_free(newshortcut);
return NULL; return NULL;
} }
IPropertySetStorage_Release(dummy); IPropertyStorage_Release(dummy);
} }
return newshortcut; return newshortcut;

View File

@ -131,24 +131,24 @@ static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site)
return hres; return hres;
} }
hres = IOleInPlaceSite_CanInPlaceActivate(This->inplace); hres = IOleInPlaceSiteEx_CanInPlaceActivate(This->inplace);
if(hres != S_OK) { if(hres != S_OK) {
WARN("CanInPlaceActivate returned: %08x\n", hres); WARN("CanInPlaceActivate returned: %08x\n", hres);
IOleInPlaceSite_Release(This->inplace); IOleInPlaceSiteEx_Release(This->inplace);
This->inplace = NULL; This->inplace = NULL;
return E_FAIL; return E_FAIL;
} }
hres = IOleInPlaceSite_GetWindow(This->inplace, &parent_hwnd); hres = IOleInPlaceSiteEx_GetWindow(This->inplace, &parent_hwnd);
if(SUCCEEDED(hres)) if(SUCCEEDED(hres))
SHSetParentHwnd(This->shell_embedding_hwnd, parent_hwnd); SHSetParentHwnd(This->shell_embedding_hwnd, parent_hwnd);
IOleInPlaceSite_OnInPlaceActivate(This->inplace); IOleInPlaceSiteEx_OnInPlaceActivate(This->inplace);
This->frameinfo.cb = sizeof(OLEINPLACEFRAMEINFO); This->frameinfo.cb = sizeof(OLEINPLACEFRAMEINFO);
IOleInPlaceSite_GetWindowContext(This->inplace, &This->doc_host.frame, &This->uiwindow, IOleInPlaceSiteEx_GetWindowContext(This->inplace, &This->doc_host.frame, &This->uiwindow,
&This->pos_rect, &This->clip_rect, &This->pos_rect, &This->clip_rect,
&This->frameinfo); &This->frameinfo);
SetWindowPos(This->shell_embedding_hwnd, NULL, SetWindowPos(This->shell_embedding_hwnd, NULL,
This->pos_rect.left, This->pos_rect.top, This->pos_rect.left, This->pos_rect.top,
@ -192,7 +192,7 @@ static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site)
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
IOleInPlaceSite_OnUIActivate(This->inplace); IOleInPlaceSiteEx_OnUIActivate(This->inplace);
if(This->doc_host.frame) if(This->doc_host.frame)
IOleInPlaceFrame_SetActiveObject(This->doc_host.frame, &This->IOleInPlaceActiveObject_iface, wszitem); IOleInPlaceFrame_SetActiveObject(This->doc_host.frame, &This->IOleInPlaceActiveObject_iface, wszitem);
@ -270,7 +270,7 @@ static void release_client_site(WebBrowser *This)
} }
if(This->inplace) { if(This->inplace) {
IOleInPlaceSite_Release(This->inplace); IOleInPlaceSiteEx_Release(This->inplace);
This->inplace = NULL; 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) static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
{ {
WebBrowser *This = impl_from_IOleObject(iface); 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) static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI OleObject_Release(IOleObject *iface)
{ {
WebBrowser *This = impl_from_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) 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); IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, NULL, NULL);
if(This->inplace) { if(This->inplace) {
IOleInPlaceSite_OnUIDeactivate(This->inplace, FALSE); IOleInPlaceSiteEx_OnUIDeactivate(This->inplace, FALSE);
IOleInPlaceSite_OnInPlaceDeactivate(This->inplace); IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace);
} }
return IOleObject_SetClientSite(iface, NULL); return IOleObject_SetClientSite(iface, NULL);
@ -574,7 +574,7 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tag
case OLEIVERB_HIDE: case OLEIVERB_HIDE:
TRACE("OLEIVERB_HIDE\n"); TRACE("OLEIVERB_HIDE\n");
if(This->inplace) if(This->inplace)
IOleInPlaceSite_OnInPlaceDeactivate(This->inplace); IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace);
if(This->shell_embedding_hwnd) if(This->shell_embedding_hwnd)
ShowWindow(This->shell_embedding_hwnd, SW_HIDE); ShowWindow(This->shell_embedding_hwnd, SW_HIDE);
return S_OK; return S_OK;
@ -737,19 +737,19 @@ static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface,
REFIID riid, LPVOID *ppobj) REFIID riid, LPVOID *ppobj)
{ {
WebBrowser *This = impl_from_IOleInPlaceObject(iface); 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) static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObject *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObject *iface)
{ {
WebBrowser *This = impl_from_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) static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObject *iface, HWND* phwnd)
@ -776,7 +776,7 @@ static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObject *ifac
FIXME("(%p)\n", This); FIXME("(%p)\n", This);
if(This->inplace) { if(This->inplace) {
IOleInPlaceSite_Release(This->inplace); IOleInPlaceSiteEx_Release(This->inplace);
This->inplace = NULL; This->inplace = NULL;
} }
@ -846,19 +846,19 @@ static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface,
REFIID riid, LPVOID *ppobj) REFIID riid, LPVOID *ppobj)
{ {
WebBrowser *This = impl_from_IOleControl(iface); 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) static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI OleControl_Release(IOleControl *iface)
{ {
WebBrowser *This = impl_from_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) static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, LPCONTROLINFO pCI)

View File

@ -38,19 +38,19 @@ static HRESULT WINAPI PersistStorage_QueryInterface(IPersistStorage *iface,
REFIID riid, LPVOID *ppobj) REFIID riid, LPVOID *ppobj)
{ {
WebBrowser *This = impl_from_IPersistStorage(iface); 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) static ULONG WINAPI PersistStorage_AddRef(IPersistStorage *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI PersistStorage_Release(IPersistStorage *iface)
{ {
WebBrowser *This = impl_from_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) static HRESULT WINAPI PersistStorage_GetClassID(IPersistStorage *iface, CLSID *pClassID)
@ -122,19 +122,19 @@ static HRESULT WINAPI PersistMemory_QueryInterface(IPersistMemory *iface,
REFIID riid, LPVOID *ppobj) REFIID riid, LPVOID *ppobj)
{ {
WebBrowser *This = impl_from_IPersistMemory(iface); 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) static ULONG WINAPI PersistMemory_AddRef(IPersistMemory *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI PersistMemory_Release(IPersistMemory *iface)
{ {
WebBrowser *This = impl_from_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) static HRESULT WINAPI PersistMemory_GetClassID(IPersistMemory *iface, CLSID *pClassID)
@ -206,19 +206,19 @@ static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface
REFIID riid, LPVOID *ppobj) REFIID riid, LPVOID *ppobj)
{ {
WebBrowser *This = impl_from_IPersistStreamInit(iface); 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) static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface)
{ {
WebBrowser *This = impl_from_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) static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID)

View File

@ -47,7 +47,7 @@ static HRESULT STDMETHODCALLTYPE taskbar_list_QueryInterface(ITaskbarList4 *ifac
IsEqualGUID(riid, &IID_ITaskbarList4) || IsEqualGUID(riid, &IID_ITaskbarList4) ||
IsEqualGUID(riid, &IID_IUnknown)) IsEqualGUID(riid, &IID_IUnknown))
{ {
IUnknown_AddRef(iface); ITaskbarList4_AddRef(iface);
*object = iface; *object = iface;
return S_OK; return S_OK;
} }

View File

@ -128,5 +128,5 @@ HRESULT WINAPI CUrlHistory_Create(IClassFactory *iface, IUnknown *pOuter, REFIID
if(pOuter) if(pOuter)
return CLASS_E_NOAGGREGATION; return CLASS_E_NOAGGREGATION;
return IUrlHistoryStg_QueryInterface(&UrlHistoryStg2, riid, ppv); return IUrlHistoryStg2_QueryInterface(&UrlHistoryStg2, riid, ppv);
} }

View File

@ -405,7 +405,7 @@ static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, LONG Left)
/* We don't really change the window position here. /* We don't really change the window position here.
* We just notify the embedder that he should do so. */ * 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) 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 don't really change the window position here.
* We just notify the embedder that he should do so. */ * 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) 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 don't really change the window size here.
* We just notify the embedder that he should do so. */ * 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) 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 don't really change the window size here.
* We just notify the embedder that he should do so. */ * 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) 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) 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)) if(FAILED(hres))
target = NULL; target = NULL;
} }
@ -839,7 +839,7 @@ static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
} }
if(!target && This->doc_host.document) 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)) if(FAILED(hres))
target = NULL; target = NULL;
} }
@ -1123,19 +1123,19 @@ static HRESULT WINAPI WBServiceProvider_QueryInterface(IServiceProvider *iface,
REFIID riid, LPVOID *ppv) REFIID riid, LPVOID *ppv)
{ {
WebBrowser *This = impl_from_IServiceProvider(iface); 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) static ULONG WINAPI WBServiceProvider_AddRef(IServiceProvider *iface)
{ {
WebBrowser *This = impl_from_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) static ULONG WINAPI WBServiceProvider_Release(IServiceProvider *iface)
{ {
WebBrowser *This = impl_from_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, static HRESULT STDMETHODCALLTYPE WBServiceProvider_QueryService(IServiceProvider *iface,
@ -1269,7 +1269,7 @@ static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void
lock_module(); lock_module();
hres = IWebBrowser_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv); hres = IWebBrowser2_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv);
IWebBrowser2_Release(&ret->IWebBrowser2_iface); IWebBrowser2_Release(&ret->IWebBrowser2_iface);
return hres; return hres;