From d2fe8b70615efb0e16a0942370ed8d2937d81c2d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 27 Jul 2012 11:15:05 +0200 Subject: [PATCH] urlmon: Use proper helpers for iface calls. --- dlls/urlmon/bindctx.c | 30 +++++++++++++++--------------- dlls/urlmon/binding.c | 8 ++++---- dlls/urlmon/download.c | 2 +- dlls/urlmon/file.c | 2 +- dlls/urlmon/ftp.c | 2 +- dlls/urlmon/http.c | 2 +- dlls/urlmon/mk.c | 2 +- dlls/urlmon/sec_mgr.c | 6 +++--- dlls/urlmon/umon.c | 4 ++-- dlls/urlmon/umstream.c | 2 +- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dlls/urlmon/bindctx.c b/dlls/urlmon/bindctx.c index 1af7fa7a129..9ddf96a0f4f 100644 --- a/dlls/urlmon/bindctx.c +++ b/dlls/urlmon/bindctx.c @@ -90,7 +90,7 @@ static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallbackEx *i } if(*ppv) { - IBindStatusCallback_AddRef((IUnknown*)*ppv); + IUnknown_AddRef((IUnknown*)*ppv); return S_OK; } @@ -261,19 +261,19 @@ static HRESULT WINAPI BSCServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) { BindStatusCallback *This = impl_from_IServiceProvider(iface); - return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); + return IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } static ULONG WINAPI BSCServiceProvider_AddRef(IServiceProvider *iface) { BindStatusCallback *This = impl_from_IServiceProvider(iface); - return IBindStatusCallback_AddRef(&This->IBindStatusCallbackEx_iface); + return IBindStatusCallbackEx_AddRef(&This->IBindStatusCallbackEx_iface); } static ULONG WINAPI BSCServiceProvider_Release(IServiceProvider *iface) { BindStatusCallback *This = impl_from_IServiceProvider(iface); - return IBindStatusCallback_Release(&This->IBindStatusCallbackEx_iface); + return IBindStatusCallbackEx_Release(&This->IBindStatusCallbackEx_iface); } static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface, @@ -284,17 +284,17 @@ static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface, if(IsEqualGUID(&IID_IHttpNegotiate, guidService)) { TRACE("(%p)->(IID_IHttpNegotiate %s %p)\n", This, debugstr_guid(riid), ppv); - return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); + return IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } if(IsEqualGUID(&IID_IHttpNegotiate2, guidService)) { TRACE("(%p)->(IID_IHttpNegotiate2 %s %p)\n", This, debugstr_guid(riid), ppv); - return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); + return IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } if(IsEqualGUID(&IID_IAuthenticate, guidService)) { TRACE("(%p)->(IID_IAuthenticate %s %p)\n", This, debugstr_guid(riid), ppv); - return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); + return IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); @@ -328,19 +328,19 @@ static HRESULT WINAPI BSCHttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv) { BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); - return IBindStatusCallback_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); + return IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } static ULONG WINAPI BSCHttpNegotiate_AddRef(IHttpNegotiate2 *iface) { BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); - return IBindStatusCallback_AddRef(&This->IBindStatusCallbackEx_iface); + return IBindStatusCallbackEx_AddRef(&This->IBindStatusCallbackEx_iface); } static ULONG WINAPI BSCHttpNegotiate_Release(IHttpNegotiate2 *iface) { BindStatusCallback *This = impl_from_IHttpNegotiate2(iface); - return IBindStatusCallback_Release(&This->IBindStatusCallbackEx_iface); + return IBindStatusCallbackEx_Release(&This->IBindStatusCallbackEx_iface); } static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, @@ -428,19 +428,19 @@ static inline BindStatusCallback *impl_from_IAuthenticate(IAuthenticate *iface) static HRESULT WINAPI BSCAuthenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv) { BindStatusCallback *This = impl_from_IAuthenticate(iface); - return IBindStatusCallback_QueryInterface(&This->IAuthenticate_iface, riid, ppv); + return IBindStatusCallbackEx_QueryInterface(&This->IBindStatusCallbackEx_iface, riid, ppv); } static ULONG WINAPI BSCAuthenticate_AddRef(IAuthenticate *iface) { BindStatusCallback *This = impl_from_IAuthenticate(iface); - return IBindStatusCallback_AddRef(&This->IBindStatusCallbackEx_iface); + return IBindStatusCallbackEx_AddRef(&This->IBindStatusCallbackEx_iface); } static ULONG WINAPI BSCAuthenticate_Release(IAuthenticate *iface) { BindStatusCallback *This = impl_from_IAuthenticate(iface); - return IBindStatusCallback_Release(&This->IBindStatusCallbackEx_iface); + return IBindStatusCallbackEx_Release(&This->IBindStatusCallbackEx_iface); } static HRESULT WINAPI BSCAuthenticate_Authenticate(IAuthenticate *iface, @@ -539,7 +539,7 @@ HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pb set_callback(holder, pbsc); IBindStatusCallback_Release(bsc); - IBindStatusCallback_Release(&holder->IBindStatusCallbackEx_iface); + IBindStatusCallbackEx_Release(&holder->IBindStatusCallbackEx_iface); return S_OK; }else { prev = bsc; @@ -603,7 +603,7 @@ HRESULT WINAPI RevokeBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc if(SUCCEEDED(hres)) { if(pbsc == holder->callback) dorevoke = TRUE; - IBindStatusCallback_Release(&holder->IBindStatusCallbackEx_iface); + IBindStatusCallbackEx_Release(&holder->IBindStatusCallbackEx_iface); }else if(pbsc == callback) { dorevoke = TRUE; } diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 58aed2041ce..4988cea661c 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -108,7 +108,7 @@ static void read_protocol_data(stgmed_buf_t *stgmed_buf) DWORD read; HRESULT hres; - do hres = IInternetProtocol_Read(stgmed_buf->protocol, buf, sizeof(buf), &read); + do hres = IInternetProtocolEx_Read(stgmed_buf->protocol, buf, sizeof(buf), &read); while(hres == S_OK); } @@ -374,7 +374,7 @@ static ULONG WINAPI StgMedUnk_Release(IUnknown *iface) if(!ref) { if(This->file != INVALID_HANDLE_VALUE) CloseHandle(This->file); - IInternetProtocol_Release(This->protocol); + IInternetProtocolEx_Release(This->protocol); heap_free(This->cache_file); heap_free(This); @@ -400,7 +400,7 @@ static stgmed_buf_t *create_stgmed_buf(IInternetProtocolEx *protocol) ret->hres = S_OK; ret->cache_file = NULL; - IInternetProtocol_AddRef(protocol); + IInternetProtocolEx_AddRef(protocol); ret->protocol = protocol; URLMON_LockModule(); @@ -486,7 +486,7 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv, TRACE("(%p)->(%p %d %p)\n", This, pv, cb, pcbRead); if(This->buf->file == INVALID_HANDLE_VALUE) { - hres = This->buf->hres = IInternetProtocol_Read(This->buf->protocol, (PBYTE)pv, cb, &read); + hres = This->buf->hres = IInternetProtocolEx_Read(This->buf->protocol, (PBYTE)pv, cb, &read); }else { hres = ReadFile(This->buf->file, pv, cb, &read, NULL) ? S_OK : INET_E_DOWNLOAD_FAILURE; } diff --git a/dlls/urlmon/download.c b/dlls/urlmon/download.c index c20c87c5a1a..743d11bd81e 100644 --- a/dlls/urlmon/download.c +++ b/dlls/urlmon/download.c @@ -62,7 +62,7 @@ static HRESULT WINAPI DownloadBSC_QueryInterface(IBindStatusCallback *iface, } if(*ppv) { - IBindStatusCallback_AddRef((IUnknown*)*ppv); + IUnknown_AddRef((IUnknown*)*ppv); return S_OK; } diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c index 8dce0bffe9f..d426f195d5e 100644 --- a/dlls/urlmon/file.c +++ b/dlls/urlmon/file.c @@ -68,7 +68,7 @@ static HRESULT WINAPI FileProtocol_QueryInterface(IInternetProtocolEx *iface, RE } if(*ppv) { - IInternetProtocol_AddRef(iface); + IInternetProtocolEx_AddRef(iface); return S_OK; } diff --git a/dlls/urlmon/ftp.c b/dlls/urlmon/ftp.c index 04cf49c5d82..da1efe202de 100644 --- a/dlls/urlmon/ftp.c +++ b/dlls/urlmon/ftp.c @@ -144,7 +144,7 @@ static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocolEx *iface, REF } if(*ppv) { - IInternetProtocol_AddRef(iface); + IInternetProtocolEx_AddRef(iface); return S_OK; } diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c index b1ca83a73e7..18a99ae3a28 100644 --- a/dlls/urlmon/http.c +++ b/dlls/urlmon/http.c @@ -612,7 +612,7 @@ static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocolEx *iface, RE } if(*ppv) { - IInternetProtocol_AddRef(iface); + IInternetProtocolEx_AddRef(iface); return S_OK; } diff --git a/dlls/urlmon/mk.c b/dlls/urlmon/mk.c index 46b4ddcc778..5437b546890 100644 --- a/dlls/urlmon/mk.c +++ b/dlls/urlmon/mk.c @@ -57,7 +57,7 @@ static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocolEx *iface, REFI } if(*ppv) { - IInternetProtocol_AddRef(iface); + IInternetProtocolEx_AddRef(iface); return S_OK; } diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index d8f1a2bb504..df90ce125d1 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -877,7 +877,7 @@ static HRESULT WINAPI SecManagerImpl_QueryInterface(IInternetSecurityManagerEx2* } /* Query Interface always increases the reference count by one when it is successful */ - IInternetSecurityManager_AddRef(iface); + IInternetSecurityManagerEx2_AddRef(iface); return S_OK; } @@ -1371,7 +1371,7 @@ static HRESULT WINAPI ZoneMgrImpl_QueryInterface(IInternetZoneManagerEx2* iface, } *ppvObject = iface; - IInternetZoneManager_AddRef(iface); + IInternetZoneManagerEx2_AddRef(iface); return S_OK; } @@ -1745,7 +1745,7 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributesEx(IInternetZoneManagerEx2* i if (dwFlags) FIXME("dwFlags 0x%x ignored\n", dwFlags); - return IInternetZoneManager_GetZoneAttributes(iface, dwZone, pZoneAttributes); + return IInternetZoneManagerEx2_GetZoneAttributes(iface, dwZone, pZoneAttributes); } diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index c8bd0f84011..cf7d916d527 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -77,7 +77,7 @@ static HRESULT WINAPI URLMoniker_QueryInterface(IMoniker *iface, REFIID riid, vo return E_NOINTERFACE; } - IMoniker_AddRef((IUnknown*)*ppv); + IUnknown_AddRef((IUnknown*)*ppv); return S_OK; } @@ -331,7 +331,7 @@ static HRESULT WINAPI URLMoniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoni if(result == 0) res = S_OK; } - IUnknown_Release(bind); + IBindCtx_Release(bind); return res; } diff --git a/dlls/urlmon/umstream.c b/dlls/urlmon/umstream.c index 792cd64979b..3a3e09a8a52 100644 --- a/dlls/urlmon/umstream.c +++ b/dlls/urlmon/umstream.c @@ -48,7 +48,7 @@ static HRESULT WINAPI ProxyBindStatusCallback_QueryInterface(IBindStatusCallback IsEqualGUID(&IID_IUnknown, riid)) { *ppv = iface; - IUnknown_AddRef(iface); + IBindStatusCallback_AddRef(iface); return S_OK; }