msi: Use inline wrappers for calling COM methods.

This commit is contained in:
Hans Leidekker 2012-07-27 14:03:12 +02:00 committed by Alexandre Julliard
parent 108d5927d0
commit 6a588baaf7
6 changed files with 9 additions and 9 deletions

View File

@ -2,6 +2,7 @@ MODULE = msi.dll
IMPORTLIB = msi IMPORTLIB = msi
IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32
DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp DELAYIMPORTS = odbccp32 wintrust crypt32 imagehlp
EXTRADEFS = -DWIDL_C_INLINE_WRAPPERS
C_SRCS = \ C_SRCS = \
action.c \ action.c \

View File

@ -609,8 +609,7 @@ static HRESULT WINAPI ListEnumerator_Clone(IEnumVARIANT* iface, IEnumVARIANT **p
hr = create_list_enumerator(This->list, (LPVOID *)ppEnum); hr = create_list_enumerator(This->list, (LPVOID *)ppEnum);
if (FAILED(hr)) if (FAILED(hr))
{ {
if (*ppEnum) if (*ppEnum) IEnumVARIANT_Release(*ppEnum);
IUnknown_Release(*ppEnum);
return hr; return hr;
} }

View File

@ -1439,7 +1439,7 @@ static HRESULT WINAPI mcr_QueryInterface( IWineMsiRemoteCustomAction *iface,
if( IsEqualCLSID( riid, &IID_IUnknown ) || if( IsEqualCLSID( riid, &IID_IUnknown ) ||
IsEqualCLSID( riid, &IID_IWineMsiRemoteCustomAction ) ) IsEqualCLSID( riid, &IID_IWineMsiRemoteCustomAction ) )
{ {
IUnknown_AddRef( iface ); IWineMsiRemoteCustomAction_AddRef( iface );
*ppobj = iface; *ppobj = iface;
return S_OK; return S_OK;
} }

View File

@ -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; if (!(stream = msi_alloc( sizeof(MSISTREAM) ))) return ERROR_NOT_ENOUGH_MEMORY;
stream->stg = stg; stream->stg = stg;
IStream_AddRef( stg ); IStorage_AddRef( stg );
stream->stm = *stm; stream->stm = *stm;
IStream_AddRef( *stm ); IStream_AddRef( *stm );
list_add_tail( &db->streams, &stream->entry ); list_add_tail( &db->streams, &stream->entry );
@ -207,7 +207,7 @@ void msi_destroy_stream( MSIDATABASE *db, const WCHAR *stname )
list_remove( &stream->entry ); list_remove( &stream->entry );
IStream_Release( stream->stm ); IStream_Release( stream->stm );
IStream_Release( stream->stg ); IStorage_Release( stream->stg );
IStorage_DestroyElement( stream->stg, stname ); IStorage_DestroyElement( stream->stg, stname );
msi_free( stream ); msi_free( stream );
CoTaskMemFree( stat.pwcsName ); CoTaskMemFree( stat.pwcsName );
@ -224,7 +224,7 @@ static void free_streams( MSIDATABASE *db )
MSISTREAM *s = LIST_ENTRY(list_head( &db->streams ), MSISTREAM, entry); MSISTREAM *s = LIST_ENTRY(list_head( &db->streams ), MSISTREAM, entry);
list_remove( &s->entry ); list_remove( &s->entry );
IStream_Release( s->stm ); IStream_Release( s->stm );
IStream_Release( s->stg ); IStorage_Release( s->stg );
msi_free( s ); msi_free( s );
} }
} }
@ -2082,7 +2082,7 @@ static HRESULT WINAPI mrd_QueryInterface( IWineMsiRemoteDatabase *iface,
if( IsEqualCLSID( riid, &IID_IUnknown ) || if( IsEqualCLSID( riid, &IID_IUnknown ) ||
IsEqualCLSID( riid, &IID_IWineMsiRemoteDatabase ) ) IsEqualCLSID( riid, &IID_IWineMsiRemoteDatabase ) )
{ {
IUnknown_AddRef( iface ); IWineMsiRemoteDatabase_AddRef( iface );
*ppobj = iface; *ppobj = iface;
return S_OK; return S_OK;
} }

View File

@ -2361,7 +2361,7 @@ static HRESULT WINAPI mrp_QueryInterface( IWineMsiRemotePackage *iface,
if( IsEqualCLSID( riid, &IID_IUnknown ) || if( IsEqualCLSID( riid, &IID_IUnknown ) ||
IsEqualCLSID( riid, &IID_IWineMsiRemotePackage ) ) IsEqualCLSID( riid, &IID_IWineMsiRemotePackage ) )
{ {
IUnknown_AddRef( iface ); IWineMsiRemotePackage_AddRef( iface );
*ppobj = iface; *ppobj = iface;
return S_OK; return S_OK;
} }

View File

@ -219,7 +219,7 @@ static HRESULT WINAPI MsiActiveScriptSite_QueryInterface(IActiveScriptSite* ifac
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IActiveScriptSite)) IsEqualGUID(riid, &IID_IActiveScriptSite))
{ {
IClassFactory_AddRef(iface); IActiveScriptSite_AddRef(iface);
*ppvObject = This; *ppvObject = This;
return S_OK; return S_OK;
} }