urlmon: Use proper helpers for iface calls.

This commit is contained in:
Jacek Caban 2012-07-27 11:15:05 +02:00 committed by Alexandre Julliard
parent 9114827e7e
commit d2fe8b7061
10 changed files with 30 additions and 30 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -62,7 +62,7 @@ static HRESULT WINAPI DownloadBSC_QueryInterface(IBindStatusCallback *iface,
}
if(*ppv) {
IBindStatusCallback_AddRef((IUnknown*)*ppv);
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}

View File

@ -68,7 +68,7 @@ static HRESULT WINAPI FileProtocol_QueryInterface(IInternetProtocolEx *iface, RE
}
if(*ppv) {
IInternetProtocol_AddRef(iface);
IInternetProtocolEx_AddRef(iface);
return S_OK;
}

View File

@ -144,7 +144,7 @@ static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocolEx *iface, REF
}
if(*ppv) {
IInternetProtocol_AddRef(iface);
IInternetProtocolEx_AddRef(iface);
return S_OK;
}

View File

@ -612,7 +612,7 @@ static HRESULT WINAPI HttpProtocol_QueryInterface(IInternetProtocolEx *iface, RE
}
if(*ppv) {
IInternetProtocol_AddRef(iface);
IInternetProtocolEx_AddRef(iface);
return S_OK;
}

View File

@ -57,7 +57,7 @@ static HRESULT WINAPI MkProtocol_QueryInterface(IInternetProtocolEx *iface, REFI
}
if(*ppv) {
IInternetProtocol_AddRef(iface);
IInternetProtocolEx_AddRef(iface);
return S_OK;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}