[This is preliminary documentation and subject to change.]
The MsiGetComponentState function obtains the state of a component.
UINT MsiGetComponentState(
MSIHANDLE hInstall, // installer handle
LPCTSTR szComponent, // component name within product
INSTALLSTATE *piInstalled, // returned current install state
INSTALLSTATE *piAction // action taken during install session
);
Value | Meaning |
---|---|
INSTALLSTATE_ABSENT | The component is not installed. |
INSTALLSTATE_BADCONFIG | The configuration data is corrupt. |
INSTALLSTATE_DEFAULT | The component will be installed in the default location: local or source. |
INSTALLSTATE_FREECACHE | The source files must be released from the client cache. |
INSTALLSTATE_INCOMPLETE | The installation is suspended or in progress. |
INSTALLSTATE_INVALIDARG | An invalid parameter was passed to the function. |
INSTALLSTATE_LOCAL | The component is installed on the local drive. |
INSTALLSTATE_LOCKCACHE | The source files in the client cache are locked. |
INSTALLSTATE_MOREDATA | The buffer overflow is returned. |
INSTALLSTATE_SOURCE | The component will run from the source, CD, or network. |
INSTALLSTATE_SOURCEABSENT | The component cannot run from the source because the source is unavailable. |
INSTALLSTATE_UNKNOWN | An unrecognized product or feature name was passed to the function. |
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