msi: Check transforms have the correct storage guid.
This commit is contained in:
parent
ee55546d34
commit
eb18bd9403
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue