MsiQueryFeatureState

[This is preliminary documentation and subject to change.]

The MsiQueryFeatureState function returns the installed state for a product feature.

INSTALLSTATE MsiQueryFeatureState(
  LPCTSTR szProduct,    // product code
  LPCTSTR szFeature     // feature ID
);
 

Parameters

szProduct
Specifies the product code for the product that contains the feature of interest.
szFeature
Identifies the feature of interest.

Return Values

INSTALLSTATE_ABSENT
The feature is not installed.
INSTALLSTATE_ADVERTISED
The feature is advertised
INSTALLSTATE_LOCAL
The feature is installed locally.
INSTALLSTATE_SOURCE
The feature is installed to run from source.
INSTALLSTATE_INVALIDARG
An invalid parameter was passed to the function.
INSTALLSTATE_UNKNOWN
The product code or feature ID is unknown.
INSTALLSTATE_BAD_CONFIGURATION
The configuration data is corrupt.

Remarks

The MsiQueryFeatureState function does not validate that the feature is actually accessible.

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