MsiUseFeature

[This is preliminary documentation and subject to change.]

The MsiUseFeature function increments the usage count for a particular feature and indicates the installation state for that feature. This function should be used to indicate an application's intent to use a feature.

INSTALLSTATE MsiUseFeature(
  LPCTSTR szProduct,   // product that owns the feature
  LPCTSTR szFeature    // feature to be used
);
 

Parameters

szProduct
Specifies the product code for the product that owns the feature to be used.
szFeature
Identifies the feature to be used.

Return Values

INSTALLSTATE_ABSENT
The feature is not installed.
INSTALLSTATE_ADVERTISED
The feature is advertised
INSTALLSTATE_LOCAL
The feature is locally installed and available for use.
INSTALLSTATE_SOURCE
The feature is installed from the source and available for use.
INSTALLSTATE_UNKNOWN
The feature is not published.

Remarks

The MsiUseFeature function should only be used on features known to be published. INSTALLSTATE_UNKNOWN indicates that the program is trying to use a feature that is not published. The application should determine whether the feature is published before calling MsiUseFeature by calling MsiQueryFeatureState or MsiEnumFeatures. The application should make these calls while it initializes. An application should only use features that are known to be published.

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

Application-Only Functions