Commit eb18bd94 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Check transforms have the correct storage guid.

parent ee55546d
......@@ -37,6 +37,8 @@
#include "query.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
static void MSI_CloseView( MSIOBJECTHDR *arg )
......@@ -737,30 +739,40 @@ MSIHANDLE WINAPI MsiGetLastErrorRecord( void )
DEFINE_GUID( CLSID_MsiTransform, 0x000c1082, 0x0000, 0x0000, 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
LPCWSTR szTransformFile, int iErrorCond )
{
UINT r;
HRESULT r;
UINT ret = ERROR_FUNCTION_FAILED;
IStorage *stg = NULL;
STATSTG stat;
TRACE("%p %s %d\n", db, debugstr_w(szTransformFile), iErrorCond);
r = StgOpenStorage( szTransformFile, NULL,
STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg);
if( r )
return r;
if ( FAILED(r) )
return ret;
r = IStorage_Stat( stg, &stat, STATFLAG_NONAME );
if ( FAILED( r ) )
goto end;
if ( !IsEqualGUID( &stat.clsid, &CLSID_MsiTransform ) )
goto end;
if( TRACE_ON( msi ) )
enum_stream_names( stg );
r = msi_table_apply_transform( db, stg );
ret = msi_table_apply_transform( db, stg );
end:
IStorage_Release( stg );
return r;
return ret;
}
UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb,
UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb,
LPCWSTR szTransformFile, int iErrorCond)
{
MSIDATABASE *db;
......
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