The MsiSummaryInfoGetProperty function gets a single property from the summary information stream.
Note The meaning of the property value depends on whether the summary information stream is for an installation database (.msi file), transform (.mst file) or patch (.msp file). See Summary Property Descriptions and Summary Information Stream Property Set for more information about summary information properties.
Syntax
C++UINT MsiSummaryInfoGetProperty(
__in MSIHANDLE hSummaryInfo,
__in UINT uiProperty,
__out UINT *puiDataType,
__out INT *piValue,
__out FILETIME *pftValue,
__out LPTSTR szValueBuf,
__inout DWORD *pcchValueBuf
);
Parameters
- hSummaryInfo [in]
-
Handle to summary information.
- uiProperty [in]
-
Specifies the property ID of the summary property. This parameter can be a property ID listed in the Summary Information Stream Property Set. This function does not return values for PID_DICTIONARY OR PID_THUMBNAIL property.
- puiDataType [out]
-
Receives the returned property type. This parameter can be a type listed in the Summary Information Stream Property Set.
- piValue [out]
-
Receives the returned integer property data.
- pftValue [out]
-
Pointer to a file value.
- szValueBuf [out]
-
Pointer to the buffer that receives the null terminated summary information property value. Do not attempt to determine the size of the buffer by passing in a null (value=0) for szValueBuf. You can get the size of the buffer by passing in an empty string (for example ""). The function then returns ERROR_MORE_DATA and pcchValueBuf contains the required buffer size in TCHARs, not including the terminating null character. On return of ERROR_SUCCESS, pcchValueBuf contains the number of TCHARs written to the buffer, not including the terminating null character. This parameter is an empty string if there are no errors.
- pcchValueBuf [in, out]
-
Pointer to the variable that specifies the size, in TCHARs, of the buffer pointed to by the variable szValueBuf. When the function returns ERROR_SUCCESS, this variable contains the size of the data copied to szValueBuf, not including the terminating null character. If szValueBuf is not large enough, the function returns ERROR_MORE_DATA and stores the required size, not including the terminating null character, in the variable pointed to by pcchValueBuf.
Return Value
The MsiSummaryInfoGetProperty function returns one of the following values:
- ERROR_INVALID_HANDLE
-
An invalid or inactive handle was supplied.
- ERROR_INVALID_PARAMETER
-
An invalid parameter was passed to the function.
- ERROR_MORE_DATA
-
The buffer passed in was too small to hold the entire value.
- ERROR_SUCCESS
-
The function succeeded.
- ERROR_UNKNOWN_PROPERTY
-
The property is unknown.
Remarks
If ERROR_MORE_DATA is returned, the parameter which is a pointer gives the size of the buffer required to hold the string. If ERROR_SUCCESS is returned, it gives the number of characters written to the string buffer. Therefore you can get the size of the buffer by passing in an empty string (for example "") for the parameter that specifies the buffer. Do not attempt to determine the size of the buffer by passing in a Null (value=0).
Windows Installer functions that return data in a user provided memory location should not be called with null as the value for the pointer. These functions return a string or return data as integer pointers, but return inconsistent values when passing null as the value for the output argument. For more information, see Passing Null as the Argument of Windows Installer Functions.
The property information returned by the MsiSummaryInfoGetProperty function is received by the piValue, pftValue, or szValueBuf parameter depending upon the type of property value that has been specified in the puiDataType parameter.
Requirements
Version | Windows Installer 5.0 on 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, Windows XP, and Windows 2000 |
---|---|
Header | Msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |
Unicode and ANSI names | MsiSummaryInfoGetPropertyW (Unicode) and MsiSummaryInfoGetPropertyA (ANSI) |
See Also
- Passing Null as the Argument of Windows Installer Functions
- Summary Information Property Functions
- Summary Information Stream Property Set
- Summaryinfo.Property
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.