Commit 052b3a74 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Fall back to the database summary information stream in MSI_OpenPackageW.

parent 248bd63b
......@@ -952,6 +952,7 @@ extern UINT msi_spawn_error_dialog( MSIPACKAGE*, LPWSTR, LPWSTR ) DECLSPEC_HIDDE
/* summary information */
extern UINT msi_get_suminfo( IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si ) DECLSPEC_HIDDEN;
extern UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **si ) DECLSPEC_HIDDEN;
extern LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC_HIDDEN;
extern INT msi_suminfo_get_int32( MSISUMMARYINFO *si, UINT uiProperty ) DECLSPEC_HIDDEN;
extern LPWSTR msi_get_suminfo_product( IStorage *stg ) DECLSPEC_HIDDEN;
......
......@@ -1488,8 +1488,12 @@ static WCHAR *get_package_code( MSIDATABASE *db )
r = msi_get_suminfo( db->storage, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info %u\n", r);
return NULL;
r = msi_get_db_suminfo( db, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info %u\n", r);
return NULL;
}
}
ret = msi_suminfo_dup_string( si, PID_REVNUMBER );
msiobj_release( &si->hdr );
......@@ -1638,9 +1642,13 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
r = msi_get_suminfo( db->storage, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info\n");
msiobj_release( &package->hdr );
return ERROR_INSTALL_PACKAGE_INVALID;
r = msi_get_db_suminfo( db, 0, &si );
if (r != ERROR_SUCCESS)
{
WARN("failed to load summary info\n");
msiobj_release( &package->hdr );
return ERROR_INSTALL_PACKAGE_INVALID;
}
}
r = parse_suminfo( si, package );
msiobj_release( &si->hdr );
......
......@@ -469,7 +469,7 @@ UINT msi_get_suminfo( IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **ret )
return ERROR_SUCCESS;
}
static UINT get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret )
UINT msi_get_db_suminfo( MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret )
{
IStream *stm;
MSISUMMARYINFO *si;
......@@ -547,7 +547,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase,
ret = msi_get_suminfo( db->storage, uiUpdateCount, &si );
if (ret != ERROR_SUCCESS)
ret = get_db_suminfo( db, uiUpdateCount, &si );
ret = msi_get_db_suminfo( db, uiUpdateCount, &si );
if (ret != ERROR_SUCCESS)
{
if ((si = create_suminfo( db->storage, uiUpdateCount )))
......
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