MsiGetSummaryInformationW function (msiquery.h)

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 MsiGetSummaryInformationW(
  [in]  MSIHANDLE hDatabase,
  [in]  LPCWSTR   szDatabasePath,
  [in]  UINT      uiUpdateCount,
  [out] MSIHANDLE *phSummaryInfo
);

Parameters

[in] hDatabase

Handle to the database.

[in] szDatabasePath

Specifies the path to the database.

[in] uiUpdateCount

Specifies the maximum number of updated values.

[out] 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.

Note

The msiquery.h header defines MsiGetSummaryInformation as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
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