msi: Return ERROR_INVALID_HANDLE when MsiDatabaseExport() is called from a custom action.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ed5f4bd14f
commit
3ff7d30520
|
@ -1194,17 +1194,8 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable,
|
|||
TRACE("%x %s %s %s\n", handle, debugstr_w(szTable),
|
||||
debugstr_w(szFolder), debugstr_w(szFilename));
|
||||
|
||||
db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
|
||||
if( !db )
|
||||
{
|
||||
MSIHANDLE remote_database = msi_get_remote(handle);
|
||||
if ( !remote_database )
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
||||
WARN("MsiDatabaseExport not allowed during a custom action!\n");
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
||||
r = MSI_DatabaseExport( db, szTable, szFolder, szFilename );
|
||||
msiobj_release( &db->hdr );
|
||||
|
|
|
@ -1135,7 +1135,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
|
|||
|
||||
GetCurrentDirectoryA(sizeof(path), path);
|
||||
r = MsiDatabaseExportA(db, "Test", path, "bogus.idt");
|
||||
todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
|
||||
ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
|
||||
|
||||
r = MsiDatabaseImportA(db, path, "bogus.idt");
|
||||
todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
|
||||
|
|
Loading…
Reference in New Issue