From 6a588baaf7ecbe01ed0dc71c8610ff9f18e8eb3c Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 27 Jul 2012 14:03:12 +0200 Subject: [PATCH] msi: Use inline wrappers for calling COM methods. --- dlls/msi/Makefile.in | 1 + dlls/msi/automation.c | 3 +-- dlls/msi/custom.c | 2 +- dlls/msi/database.c | 8 ++++---- dlls/msi/package.c | 2 +- dlls/msi/script.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in index 140b5f1bf64..9ea0861dcea 100644 --- a/dlls/msi/Makefile.in +++ b/dlls/msi/Makefile.in @@ -2,6 +2,7 @@ MODULE = msi.dll IMPORTLIB = msi IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp +EXTRADEFS = -DWIDL_C_INLINE_WRAPPERS C_SRCS = \ action.c \ diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 918572a9d36..e55717af7f1 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -609,8 +609,7 @@ static HRESULT WINAPI ListEnumerator_Clone(IEnumVARIANT* iface, IEnumVARIANT **p hr = create_list_enumerator(This->list, (LPVOID *)ppEnum); if (FAILED(hr)) { - if (*ppEnum) - IUnknown_Release(*ppEnum); + if (*ppEnum) IEnumVARIANT_Release(*ppEnum); return hr; } diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 88dcf870947..8f32e590300 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -1439,7 +1439,7 @@ static HRESULT WINAPI mcr_QueryInterface( IWineMsiRemoteCustomAction *iface, if( IsEqualCLSID( riid, &IID_IUnknown ) || IsEqualCLSID( riid, &IID_IWineMsiRemoteCustomAction ) ) { - IUnknown_AddRef( iface ); + IWineMsiRemoteCustomAction_AddRef( iface ); *ppobj = iface; return S_OK; } diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 1f3ab81bd85..9c0d3466aba 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -164,7 +164,7 @@ UINT msi_get_raw_stream( MSIDATABASE *db, LPCWSTR stname, IStream **stm ) if (!(stream = msi_alloc( sizeof(MSISTREAM) ))) return ERROR_NOT_ENOUGH_MEMORY; stream->stg = stg; - IStream_AddRef( stg ); + IStorage_AddRef( stg ); stream->stm = *stm; IStream_AddRef( *stm ); list_add_tail( &db->streams, &stream->entry ); @@ -207,7 +207,7 @@ void msi_destroy_stream( MSIDATABASE *db, const WCHAR *stname ) list_remove( &stream->entry ); IStream_Release( stream->stm ); - IStream_Release( stream->stg ); + IStorage_Release( stream->stg ); IStorage_DestroyElement( stream->stg, stname ); msi_free( stream ); CoTaskMemFree( stat.pwcsName ); @@ -224,7 +224,7 @@ static void free_streams( MSIDATABASE *db ) MSISTREAM *s = LIST_ENTRY(list_head( &db->streams ), MSISTREAM, entry); list_remove( &s->entry ); IStream_Release( s->stm ); - IStream_Release( s->stg ); + IStorage_Release( s->stg ); msi_free( s ); } } @@ -2082,7 +2082,7 @@ static HRESULT WINAPI mrd_QueryInterface( IWineMsiRemoteDatabase *iface, if( IsEqualCLSID( riid, &IID_IUnknown ) || IsEqualCLSID( riid, &IID_IWineMsiRemoteDatabase ) ) { - IUnknown_AddRef( iface ); + IWineMsiRemoteDatabase_AddRef( iface ); *ppobj = iface; return S_OK; } diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 111594283c3..a050b2eb54b 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -2361,7 +2361,7 @@ static HRESULT WINAPI mrp_QueryInterface( IWineMsiRemotePackage *iface, if( IsEqualCLSID( riid, &IID_IUnknown ) || IsEqualCLSID( riid, &IID_IWineMsiRemotePackage ) ) { - IUnknown_AddRef( iface ); + IWineMsiRemotePackage_AddRef( iface ); *ppobj = iface; return S_OK; } diff --git a/dlls/msi/script.c b/dlls/msi/script.c index 4866630b587..94577bae058 100644 --- a/dlls/msi/script.c +++ b/dlls/msi/script.c @@ -219,7 +219,7 @@ static HRESULT WINAPI MsiActiveScriptSite_QueryInterface(IActiveScriptSite* ifac if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IActiveScriptSite)) { - IClassFactory_AddRef(iface); + IActiveScriptSite_AddRef(iface); *ppvObject = This; return S_OK; }