MsiGetFeatureStateA function (msiquery.h)
The MsiGetFeatureState function gets the requested state of a feature.
Syntax
UINT MsiGetFeatureStateA(
[in] MSIHANDLE hInstall,
[in] LPCSTR szFeature,
[out] INSTALLSTATE *piInstalled,
[out] INSTALLSTATE *piAction
);
Parameters
[in] hInstall
Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.
[in] szFeature
Specifies the feature name within the product.
[out] piInstalled
Specifies the returned current installed state. This parameter must not be null. This parameter can be one of the following values.
[out] piAction
Receives the action taken during the installation session. This parameter must not be null. For return values, see piInstalled.
Return value
The MsiGetFeatureState function returns the following values:
Remarks
See Calling Database Functions From Programs.
If the function fails, you can obtain extended error information by using MsiGetLastErrorRecord.
Note
The msiquery.h header defines MsiGetFeatureState as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
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 |
Target Platform | Windows |
Header | msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |