Commit 6a588baa authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Use inline wrappers for calling COM methods.

parent 108d5927
......@@ -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 \
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
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