diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-04 17:42:41 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-06 20:30:33 +0100 |
| commit | d784cc209480e41e11e5ee0f2d6aeeee4bae558c (patch) | |
| tree | f82785c7f0a5781fc013c4e7936d4ecd7d9d52c6 /libmsi/database.c | |
| parent | 6bba7d7717a6dde4444280615b71a7c1d8bd2cae (diff) | |
use arrays of chars for GUIDs
Diffstat (limited to 'libmsi/database.c')
| -rw-r--r-- | libmsi/database.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libmsi/database.c b/libmsi/database.c index bacdcbe..249fc5e 100644 --- a/libmsi/database.c +++ b/libmsi/database.c @@ -36,11 +36,11 @@ #include "msipriv.h" #include "objidl.h" #include "objbase.h" -#include "msiserver.h" #include "query.h" -#include "initguid.h" - +const char clsid_msi_transform[16] = { 0x82, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46 }; +const char clsid_msi_database[16] = { 0x84, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46 }; +const char clsid_msi_patch[16] = { 0x86, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46 }; /* * .MSI file format @@ -659,16 +659,16 @@ LibmsiResult _libmsi_database_open(LibmsiDatabase *db) goto end; } - if ( !IsEqualGUID( &stat.clsid, &CLSID_MsiDatabase ) && - !IsEqualGUID( &stat.clsid, &CLSID_MsiPatch ) && - !IsEqualGUID( &stat.clsid, &CLSID_MsiTransform ) ) + if ( memcmp( &stat.clsid, &clsid_msi_database, 16 ) != 0 && + memcmp( &stat.clsid, &clsid_msi_patch, 16 ) != 0 && + memcmp( &stat.clsid, &clsid_msi_transform, 16 ) != 0 ) { ERR("storage GUID is not a MSI database GUID %s\n", debugstr_guid(&stat.clsid) ); goto end; } - if ( db->patch && !IsEqualGUID( &stat.clsid, &CLSID_MsiPatch ) ) + if ( db->patch && memcmp( &stat.clsid, &clsid_msi_patch, 16 ) != 0 ) { ERR("storage GUID is not the MSI patch GUID %s\n", debugstr_guid(&stat.clsid) ); @@ -729,7 +729,7 @@ LibmsiResult _libmsi_database_start_transaction(LibmsiDatabase *db, const char * msi_free(szwPersist); if ( SUCCEEDED(hr) ) - hr = IStorage_SetClass( stg, db->patch ? &CLSID_MsiPatch : &CLSID_MsiDatabase ); + hr = IStorage_SetClass( stg, db->patch ? &clsid_msi_patch : &clsid_msi_database ); if( FAILED( hr ) ) { |
