MsiGetSummaryInformationA 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 MsiGetSummaryInformationA(
  MSIHANDLE hDatabase,
  LPCSTR    szDatabasePath,
  UINT      uiUpdateCount,
  MSIHANDLE *phSummaryInfo
);

Parameters

hDatabase

Handle to the database.

szDatabasePath

Specifies the path to the database.

uiUpdateCount

Specifies the maximum number of updated values.

phSummaryInfo

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

Return Value

The MsiGetSummaryInformation function returns the following values:

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

   
Minimum supported client 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
Target Platform Windows
Header msiquery.h
Library Msi.lib
DLL Msi.dll

See Also

Summary Information Property Functions

Summary Information Stream Property Set