Commit b2d3567c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Return ERROR_INVALID_HANDLE when MsiOpenPackage() is called from a custom action.

parent 4bb40d1a
......@@ -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);
}
......
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