MsiGetFeatureState

[This is preliminary documentation and subject to change.]

The MsiGetFeatureState function gets the requested state of a feature.

UINT MsiGetFeatureState(
  MSIHANDLE hInstall,         // installer handle
  LPCTSTR szFeature,          // feature name within product
  INSTALLSTATE *piInstalled,  // returned current install state
  INSTALLSTATE *piAction      // action taken during install session
);
 

Parameters

hInstall
Handle to the installation.
szFeature
Specifies the feature name within the product.
piInstalled
Specifies the returned current installed state. This parameter can be one of the following values.
Value Meaning
INSTALLSTATE_BADCONFIG The configuration data is corrupt.
INSTALLSTATE_INCOMPLETE The installation is suspended or in progress.
INSTALLSTATE_SOURCEABSENT The feature must run from source, and the source is unavailable.
INSTALLSTATE_MOREDATA The return buffer is full.
INSTALLSTATE_INVALIDARG An invalid parameter was passed to the function.
INSTALLSTATE_UNKNOWN An unrecognized product or feature was specified.
INSTALLSTATE_ABSENT The feature was uninstalled.
INSTALLSTATE_LOCAL The feature was installed on the local drive.
INSTALLSTATE_SOURCE The feature must run from source, CD, or network.
INSTALLSTATE_DEFAULT The feature will be installed in the default location: local or source.
INSTALLSTATE_LOCKCACHE The source files are locked in the client cache.
INSTALLSTATE_FREECACHE The source files are released from the client cache.

piAction
Specifies the action taken during the installation session. For return values, see piInstalled.

Return Values

ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_SUCCESS
The function succeeded.
ERROR_UNKNOWN_FEATURE
An unknown feature was requested.

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 msiquery.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Database Access Reference, Installer Selection Functions