Commit 4d5bebb3 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shlwapi: Use proper helpers for iface calls.

parent db829975
...@@ -446,7 +446,7 @@ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown) ...@@ -446,7 +446,7 @@ HRESULT WINAPI RegisterDefaultAcceptHeaders(LPBC lpBC, IUnknown *lpUnknown)
IEnumFORMATETC_Release(pClone); IEnumFORMATETC_Release(pClone);
} }
IEnumFORMATETC_Release(pIUnknown); IUnknown_Release(pIUnknown);
} }
IUnknown_Release(V_UNKNOWN(&var)); IUnknown_Release(V_UNKNOWN(&var));
} }
...@@ -1202,7 +1202,7 @@ HRESULT WINAPI ConnectToConnectionPoint(IUnknown* lpUnkSink, REFIID riid, BOOL f ...@@ -1202,7 +1202,7 @@ HRESULT WINAPI ConnectToConnectionPoint(IUnknown* lpUnkSink, REFIID riid, BOOL f
IConnectionPoint_Release(lpCP); /* Release it */ IConnectionPoint_Release(lpCP); /* Release it */
} }
IUnknown_Release(lpContainer); IConnectionPointContainer_Release(lpContainer);
} }
return hRet; return hRet;
} }
...@@ -1400,7 +1400,7 @@ HRESULT WINAPI IUnknown_SetSite( ...@@ -1400,7 +1400,7 @@ HRESULT WINAPI IUnknown_SetSite(
{ {
hr = IObjectWithSite_SetSite(iobjwithsite, site); hr = IObjectWithSite_SetSite(iobjwithsite, site);
TRACE("done IObjectWithSite_SetSite ret=%08x\n", hr); TRACE("done IObjectWithSite_SetSite ret=%08x\n", hr);
IUnknown_Release(iobjwithsite); IObjectWithSite_Release(iobjwithsite);
} }
else else
{ {
...@@ -1410,7 +1410,7 @@ HRESULT WINAPI IUnknown_SetSite( ...@@ -1410,7 +1410,7 @@ HRESULT WINAPI IUnknown_SetSite(
hr = IInternetSecurityManager_SetSecuritySite(isecmgr, (IInternetSecurityMgrSite *)site); hr = IInternetSecurityManager_SetSecuritySite(isecmgr, (IInternetSecurityMgrSite *)site);
TRACE("done IInternetSecurityManager_SetSecuritySite ret=%08x\n", hr); TRACE("done IInternetSecurityManager_SetSecuritySite ret=%08x\n", hr);
IUnknown_Release(isecmgr); IInternetSecurityManager_Release(isecmgr);
} }
return hr; return hr;
} }
...@@ -1493,7 +1493,7 @@ HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID ri ...@@ -1493,7 +1493,7 @@ HRESULT WINAPI IUnknown_QueryService(IUnknown* lpUnknown, REFGUID sid, REFIID ri
TRACE("(IServiceProvider*)%p returned (IUnknown*)%p\n", pService, *lppOut); TRACE("(IServiceProvider*)%p returned (IUnknown*)%p\n", pService, *lppOut);
IUnknown_Release(pService); IServiceProvider_Release(pService);
} }
return hRet; return hRet;
} }
...@@ -1613,7 +1613,7 @@ HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg ...@@ -1613,7 +1613,7 @@ HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg
if (ret == S_OK) if (ret == S_OK)
{ {
ret = IInputObject_UIActivateIO(object, activate, msg); ret = IInputObject_UIActivateIO(object, activate, msg);
IUnknown_Release(object); IInputObject_Release(object);
} }
return ret; return ret;
......
...@@ -833,7 +833,7 @@ static HRESULT WINAPI Disp_QueryInterface( ...@@ -833,7 +833,7 @@ static HRESULT WINAPI Disp_QueryInterface(
if (*ppvObject) if (*ppvObject)
{ {
IUnknown_AddRef(This); IDispatch_AddRef(This);
return S_OK; return S_OK;
} }
...@@ -948,7 +948,7 @@ static HRESULT WINAPI Enum_QueryInterface( ...@@ -948,7 +948,7 @@ static HRESULT WINAPI Enum_QueryInterface(
if (*ppvObject) if (*ppvObject)
{ {
IUnknown_AddRef(This); IEnumConnections_AddRef(This);
return S_OK; return S_OK;
} }
...@@ -1040,7 +1040,7 @@ static HRESULT WINAPI ConPt_QueryInterface( ...@@ -1040,7 +1040,7 @@ static HRESULT WINAPI ConPt_QueryInterface(
if (*ppvObject) if (*ppvObject)
{ {
IUnknown_AddRef(This); IConnectionPoint_AddRef(This);
return S_OK; return S_OK;
} }
...@@ -1181,7 +1181,7 @@ static HRESULT WINAPI EnumPt_QueryInterface( ...@@ -1181,7 +1181,7 @@ static HRESULT WINAPI EnumPt_QueryInterface(
if (*ppvObject) if (*ppvObject)
{ {
IUnknown_AddRef(This); IEnumConnectionPoints_AddRef(This);
return S_OK; return S_OK;
} }
...@@ -1217,7 +1217,7 @@ static HRESULT WINAPI EnumPt_Next( ...@@ -1217,7 +1217,7 @@ static HRESULT WINAPI EnumPt_Next(
if (cConnections > 0 && iface->idx < iface->container->ptCount) if (cConnections > 0 && iface->idx < iface->container->ptCount)
{ {
*rgcd = iface->container->pt[iface->idx]; *rgcd = iface->container->pt[iface->idx];
IUnknown_AddRef(iface->container->pt[iface->idx]); IConnectionPoint_AddRef(iface->container->pt[iface->idx]);
if (pcFetched) if (pcFetched)
*pcFetched = 1; *pcFetched = 1;
iface->idx++; iface->idx++;
...@@ -1272,7 +1272,7 @@ static HRESULT WINAPI Contain_QueryInterface( ...@@ -1272,7 +1272,7 @@ static HRESULT WINAPI Contain_QueryInterface(
if (*ppvObject) if (*ppvObject)
{ {
IUnknown_AddRef(This); IConnectionPointContainer_AddRef(This);
return S_OK; return S_OK;
} }
...@@ -1300,7 +1300,7 @@ static ULONG WINAPI Contain_Release( ...@@ -1300,7 +1300,7 @@ static ULONG WINAPI Contain_Release(
{ {
int i; int i;
for (i = 0; i < iface->ptCount; i++) for (i = 0; i < iface->ptCount; i++)
IUnknown_Release(iface->pt[i]); IConnectionPoint_Release(iface->pt[i]);
HeapFree(GetProcessHeap(),0,iface->pt); HeapFree(GetProcessHeap(),0,iface->pt);
} }
HeapFree(GetProcessHeap(),0,This); HeapFree(GetProcessHeap(),0,This);
...@@ -1456,7 +1456,7 @@ static HRESULT WINAPI Prop_QueryInterface( ...@@ -1456,7 +1456,7 @@ static HRESULT WINAPI Prop_QueryInterface(
if (*ppvObject) if (*ppvObject)
{ {
IUnknown_AddRef(This); IPropertyBag_AddRef(This);
return S_OK; return S_OK;
} }
...@@ -2104,7 +2104,7 @@ static HRESULT WINAPI IOleCommandTargetImpl_QueryInterface(IOleCommandTarget *if ...@@ -2104,7 +2104,7 @@ static HRESULT WINAPI IOleCommandTargetImpl_QueryInterface(IOleCommandTarget *if
if(*ppvObj) if(*ppvObj)
{ {
IUnknown_AddRef(iface); IOleCommandTarget_AddRef(iface);
return S_OK; return S_OK;
} }
...@@ -2215,7 +2215,7 @@ static HRESULT WINAPI IServiceProviderImpl_QueryInterface(IServiceProvider *ifac ...@@ -2215,7 +2215,7 @@ static HRESULT WINAPI IServiceProviderImpl_QueryInterface(IServiceProvider *ifac
if(*ppvObj) if(*ppvObj)
{ {
IUnknown_AddRef(iface); IServiceProvider_AddRef(iface);
/* native uses redefined IID_IServiceProvider symbol, so we can't compare pointers */ /* native uses redefined IID_IServiceProvider symbol, so we can't compare pointers */
if (IsEqualIID(riid, &IID_IServiceProvider)) if (IsEqualIID(riid, &IID_IServiceProvider))
add_call(&trace_got, 1, iface, &IID_IServiceProvider, 0, 0, 0); add_call(&trace_got, 1, iface, &IID_IServiceProvider, 0, 0, 0);
...@@ -2333,7 +2333,7 @@ static HRESULT WINAPI IProfferServiceImpl_QueryInterface(IProfferService *iface, ...@@ -2333,7 +2333,7 @@ static HRESULT WINAPI IProfferServiceImpl_QueryInterface(IProfferService *iface,
if(*ppvObj) if(*ppvObj)
{ {
IUnknown_AddRef(iface); IProfferService_AddRef(iface);
return S_OK; return S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment