MsiGetSummaryInformation function

The MsiGetSummaryInformation function obtains a handle to the _SummaryInformation stream for an installer database. This function returns a handle that should be closed using MsiCloseHandle.

Syntax


UINT MsiGetSummaryInformation(
  _In_   MSIHANDLE hDatabase,
  _In_   LPCTSTR szDatabasePath,
  _In_   UINT uiUpdateCount,
  _Out_  MSIHANDLE *phSummaryInfo
);

Parameters

hDatabase [in]

Handle to the database.

szDatabasePath [in]

Specifies the path to the database.

uiUpdateCount [in]

Specifies the maximum number of updated values.

phSummaryInfo [out]

Pointer to the location from which to receive the summary information handle.

Return value

The MsiGetSummaryInformation function returns the following values:

ERROR_INSTALL_PACKAGE_INVALID

The installation package is invalid.

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_SUCCESS

The function succeeded.

Remarks

If the database specified by the MsiGetSummaryInformation function is not open, you must specify 0 for hDatabase and specify the path to the database in szDatabasePath. If the database is open, you must set szDatabasePath to 0.

If a value of uiUpdateCount greater than 0 is used to open an existing summary information stream, MsiSummaryInfoPersist must be called before closing the phSummaryInfo handle. Failing to do this will lose the existing stream information.

To view the summary information of a patch using MsiGetSummaryInformation, set szDatabasePath to the path to the patch. Alternately, you can create a handle to the patch using MsiOpenDatabase and then pass that handle to MsiGetSummaryInformation as the hDatabase parameter.

Note that it is recommended to use variables of type PMSIHANDLE because the installer closes PMSIHANDLE objects as they go out of scope, whereas you must close MSIHANDLE objects by calling MsiCloseHandle. For more information see Use PMSIHANDLE instead of HANDLE section in the Windows Installer Best Practices.

If the function fails, you can obtain extended error information by using MsiGetLastErrorRecord.

Requirements

Version

Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP

Header

Msiquery.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiGetSummaryInformationW (Unicode) and MsiGetSummaryInformationA (ANSI)

See also

Summary Information Property Functions
Summary Information Stream Property Set

 

 

Community Additions

ADD
Show:
© 2014 Microsoft