mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 12:39:35 +00:00
[WINESYNC] msi: Return ERROR_INVALID_HANDLE when MsiOpenPackage() 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> wine commit id b2d3567c1b4846905f01612d8f499f45ed9d24ac by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
df4fa37bf9
commit
b720e4c0e2
2 changed files with 3 additions and 13 deletions
|
@ -1471,18 +1471,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage)
|
|||
if( szPackage[0] == '#' )
|
||||
{
|
||||
handle = atoiW(&szPackage[1]);
|
||||
db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE );
|
||||
if( !db )
|
||||
{
|
||||
MSIHANDLE remote;
|
||||
|
||||
if (!(remote = msi_get_remote(handle)))
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
||||
WARN("MsiOpenPackage not allowed during a custom action!\n");
|
||||
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE)))
|
||||
return ERROR_INVALID_HANDLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1154,7 +1154,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
|
|||
|
||||
sprintf(package_name, "#%u", db);
|
||||
r = MsiOpenPackageA(package_name, &package);
|
||||
todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
|
||||
ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
|
||||
|
||||
MsiCloseHandle(db);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue