The MsiEnumFeatures function enumerates the published features for a given product. This function retrieves one feature ID each time it is called.
UINT MsiEnumFeaturesW( LPCWSTR szProduct, DWORD iFeatureIndex, LPWSTR lpFeatureBuf, LPWSTR lpParentBuf );
Null-terminated string specifying the product code of the product whose features are to be enumerated.
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.
Pointer to a buffer that receives the feature ID. The size of the buffer must hold a string value of length MAX_FEATURE_CHARS+1. The function returns ERROR_MORE_DATA if the length of the feature ID exceeds MAX_FEATURE_CHARS.
Pointer to a buffer that receives the feature ID of the parent of the feature. The size of the buffer must hold a string value of length MAX_FEATURE_CHARS+1. If the length of the feature ID of the parent feature exceeds MAX_FEATURE_CHARS, only the first MAX_FEATURE_CHARS characters get copied into the buffer.
||The configuration data is corrupt.|
||An invalid parameter was passed to the function.|
||A buffer is too small to hold the requested data.|
||There are no features to return.|
||A value was enumerated.|
||The specified product is unknown.|
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).
|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. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.|