IValidate::OpenDatabase method (evalcom2.h)

The OpenDatabase method opens a Windows Installer installation package or merge module for validation.

Syntax

HRESULT OpenDatabase(
  [in] LPCOLESTR szDatabase
);

Parameters

[in] szDatabase

The fully qualified path to the installation package or merge module to be opened. The szDatabase parameter cannot be NULL.

Return value

Return code Description
S_OK
The method succeeded.
E_POINTER
The value of szDatabase is invalid.
 

This method can also return one or more of the errors returned by the MsiOpenDatabase function. The error is converted to HRESULTS using the HRESULT_FROM_WIN32 function.

Remarks

The OpenDatabase method can also accept a handle to an opened database. The handle to the opened database can be provided in the form "#nnnn" where nnnn is the database handle in string form. For example, for an opened database handle 123, the method can accept #123 for the value of szDatabase instead of the path to the package.

Requirements

Requirement Value
Minimum supported client Evalcom2.dll version 3.0.3790.371 or later
Target Platform Windows
Header evalcom2.h
DLL Evalcom2.dll

See also

IValidate

Using Evalcom2

Validation Callback Functions