[This is preliminary documentation and subject to change.]
The MsiGetFeatureValidStates function returns a valid installation state.
UINT MsiGetFeatureValidStates(
MSIHANDLE hInstall, // installer handle
LPCTSTR szFeature, // feature name
DWORD *dwInstallState // install state
);
Value | Meaning |
---|---|
1 << INSTALLSTATE_ABSENT | The feature can be uninstalled. |
1 << INSTALLSTATE_ADVERTISED | The feature can be advertised. |
1 << INSTALLSTATE_LOCAL | The feature can be installed on the local drive. |
1 << INSTALLSTATE_SOURCE | The feature can be configured to run from source, CD, or network. |
1 << INSTALLSTATE_DEFAULT | The feature can be configured to use the default location: local or source. |
The MsiGetFeatureValidStates function determines state validity by querying all components that are linked to the specified feature without taking into account the current installed state of any component. If any of these components have a value of IRSOPTIONAL in the RunFromSource column, or if at least one component is marked IRSTLOCALONLY and at least one other component is marked IRSSOURCEONLY, then both INSTALLSTATE_LOCAL and INSTALLSTATE_SOURCE are valid states for the feature. If all components are set to IRSLOCALONLY, INSTALLSTATE_LOCAL is the only valid state. If all components are set to IRSSOURCEONLY, INSTALLSTATE_SOURCE is the only valid state.
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.
Database Access Reference, Installer Selection Functions