MsiGetFeatureInfo function
The MsiGetFeatureInfo function returns descriptive information for a feature.
Syntax
UINT MsiGetFeatureInfo( _In_ MSIHANDLE hProduct, _In_ LPCTSTR szFeature, _Out_opt_ LPDWORD lpAttributes, _Out_opt_ LPTSTR lpTitleBuf, _Inout_opt_ LPDWORD pcchTitleBuf, _Out_opt_ LPTSTR lpHelpBuf, _Inout_opt_ LPDWORD pcchHelpBuf );
Parameters
- hProduct [in]
-
Handle to the product that owns the feature. This handle is obtained from MsiOpenProduct.
- szFeature [in]
-
Feature code for the feature about which information should be returned.
- lpAttributes [out, optional]
-
Pointer to a location containing one or more of the following Attribute flags.
- INSTALLFEATUREATTRIBUTE_FAVORLOCAL (1)
- INSTALLFEATUREATTRIBUTE_FAVORSOURCE (2)
- INSTALLFEATUREATTRIBUTE_FOLLOWPARENT (4)
- INSTALLFEATUREATTRIBUTE_FAVORADVERTISE (8)
- INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE (16)
- INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE (32)
For more information, see Feature Table. The values that MsiGetFeatureInfo returns are double the values in the Attributes column of the Feature Table.
- lpTitleBuf [out, optional]
-
Pointer to a buffer to receive the localized name of the feature, which corresponds to the Title field in the Feature Table. This parameter is optional and can be null.
- pcchTitleBuf [in, out, optional]
-
As input, the size of lpTitleBuf. As output, the number of characters returned in lpTitleBuf. On input, this is the full size of the buffer, and includes a space for a terminating null character. If the buffer that is passed in is too small, the count returned does not include the terminating null character.
- lpHelpBuf [out, optional]
-
Pointer to a buffer to receive the localized description of the feature, which corresponds to the Description field for the feature in the Feature table. This parameter is optional and can be null.
- pcchHelpBuf [in, out, optional]
-
As input, the size of lpHelpBuf. As output, the number of characters returned in lpHelpBuf. On input, this is the full size of the buffer, and includes a space for a terminating null character. If the buffer passed in is too small, the count returned does not include the terminating null character.
Return value
| Return code | Description |
|---|---|
|
The product handle is invalid. |
|
One of the parameters is invalid. |
|
A buffer is too small to hold the requested data. |
|
The function returns successfully. |
|
The feature is not known. |
Remarks
The buffer sizes for the MsiGetFeatureInfo function should include an extra character for the terminating null character. If a buffer is too small, the returned string is truncated with null, and the buffer size contains the number of characters in the whole string, not including the terminating null character. For more information, see Calling Database Functions From Programs.
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. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
|---|---|
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | MsiGetFeatureInfoW (Unicode) and MsiGetFeatureInfoA (ANSI) |
See also
Build date: 11/30/2012