MsiGetActiveDatabase

[This is preliminary documentation and subject to change.]

The MsiGetActiveDatabase function returns the active database for the installation.

MSIHANDLE MsiGetActiveDatabase(
  MSIHANDLE hInstall    // installer handle
);
 

Parameters

hInstall
Handle to the installation passed to the custom action.

Return Values

If the function succeeds, it returns a handle to the database currently in use by the installer.

If the function fails, the return value can be the following:

ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.

Remarks

The MsiGetActiveDatabase function is used to access the database in use by the running the installation.

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.

See Also

Database Access Reference, General Database Access Functions