MsiGetFeatureInfo

[This is preliminary documentation and subject to change.]

The MsiGetFeatureInfo function returns descriptive information for a feature.

UINT MsiGetFeatureInfo(
  MSIHANDLE hProduct,  // product handle obtained from MsiOpenProduct
  LPCTSTR szFeature,   // feature name
  DWORD *lpAttributes, // attribute flags
  LPTSTR lpTitleBuf,   // localized name
  DWORD *pcchTitleBuf, // in/out buffer character count
  LPTSTR lpHelpBuf,    // description
  DWORD *pcchHelpBuf   // in/out buffer character count
);
 

Parameters

hProduct
Handle to the product that owns the feature. This handle is obtained from MsiOpenProduct.
szFeature
Specifies the feature code for the feature about which information should be returned.
lpAttributes
Specifies the attribute flags. Must be one or more of the following.
Flag Value
INSTALLFEATUREATTRIBUTE_FAVORLOCAL 1 << 0
INSTALLFEATUREATTRIBUTE_FAVORSOURCE 1 << 1
INSTALLFEATUREATTRIBUTE_FOLLOWPARENT 1 << 2
INSTALLFEATUREATTRIBUTE_FAVORADVERTISE 1 << 3
INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE 1 << 4

For information on how these flags work together, see the Feature table.

lpTitleBuf
Pointer to a buffer to receive the localized descriptive name of the feature.
pcchTitleBuf
As input, the size of lpTitleBuf. As output, the number of characters returned in lpTitleBuf.
lpHelpBuf
Pointer to a buffer to receive the localized descriptive name of the feature.
pcchHelpBuf
As input, the size of lpHelpBuf. As output, the number of characters returned in lpHelpBuf.

Return Values

ERROR_INVALID_HANDLE
The product handle is invalid.
ERROR_INVALID_PARAMETER
One of the parameters is invalid.
ERROR_MORE_DATA
A buffer is too small to hold the requested data.
ERROR_SUCCESS
The function returned successfully.
ERROR_UNKNOWN_FEATURE
The feature is not known.

Remarks

The buffer sizes for the MsiGetFeatureInfo function should include an extra character for the terminating NULL character upon input. If a buffer is too small, the returned string will be truncated with NULL, and the buffer size will contain the number of characters in the whole string, not including the terminating NULL.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msi.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Product Query Functions