MsiEnumFeatures

[This is preliminary documentation and subject to change.]

The MsiEnumFeatures function enumerates the published features for a given product. This function retrieves one feature ID each time it is called.

UINT MsiEnumFeatures(
  LPCTSTR szProduct,     // product code, string GUID
  DWORD iFeatureIndex,   // 0-based index into published features
  LPTSTR lpFeatureBuf,   // buffer for feature
  LPTSTR lpParentBuf     // buffer for parent of feature
);
 

Parameters

szProduct
Specifies the product whose features are to be enumerated.
iFeatureIndex
Specifies the index of the feature to retrieve. This parameter should be zero for the first call to the MsiEnumFeatures function and then incremented for subsequent calls. Because features are not ordered, any new feature has an arbitrary index. This means that the function can return features in any order.
lpFeatureBuf
Pointer to a buffer that receives the feature ID. Must be sized to hold a string of length MAX_FEATURE_CHARS.
lpParentBuf
Pointer to a buffer that receives the feature ID of the parent of the feature. Must be sized to hold a string of length MAX_FEATURE_CHARS.

Return Values

ERROR_BAD_CONFIGURATION
The configuration data is corrupt.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_NO_MORE_ITEMS
There are no features to return.
ERROR_SUCCESS
A value was enumerated.
ERROR_UNKNOWN_PRODUCT
The specified product is unknown.

Remarks

To enumerate features, an application should initially call the MsiEnumFeatures function with the iFeatureIndex parameter set to zero. The application should then increment the iFeatureIndex parameter and call MsiEnumFeatures until there are no more features (that is, until the function returns ERROR_NO_MORE_ITEMS).

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

System Status Functions