Implement the functionality that allows one to call MsiOpenPackage

with #nnn where nnn is a string representing the handle to an open
database.
This commit is contained in:
Aric Stewart 2004-07-14 21:43:49 +00:00 committed by Alexandre Julliard
parent 433b5d416f
commit 9c76b14469
1 changed files with 11 additions and 3 deletions

View File

@ -378,9 +378,17 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
TRACE("%s %p\n",debugstr_w(szPackage), pPackage);
rc = MSI_OpenDatabaseW(szPackage, MSIDBOPEN_READONLY, &db);
if (rc != ERROR_SUCCESS)
return ERROR_FUNCTION_FAILED;
if (szPackage[0] == '#')
{
INT handle = atoiW(&szPackage[1]);
db = msihandle2msiinfo( handle , MSIHANDLETYPE_DATABASE);
}
else
{
rc = MSI_OpenDatabaseW(szPackage, MSIDBOPEN_READONLY, &db);
if (rc != ERROR_SUCCESS)
return ERROR_FUNCTION_FAILED;
}
package = alloc_msiobject( MSIHANDLETYPE_PACKAGE, sizeof (MSIPACKAGE),
MSI_FreePackage );