CChkSGFiles.ErrInit function
Last modified: March 03, 2013
Applies to: Exchange Server 2003 | Exchange Server 2007 | Exchange Server 2010 | Exchange Server 2013
Initializes the CChkSGFiles object by specifying the databases to be checked and the path and base name of the transaction log files to be checked. Applications should call this function immediately after successfully calling the New function.
Vitual ERRErrInit
(
Const WCHAR * const rgwszDb[],
Const ULONGcDB,
__in_z const WCHAR * const wszLogPath,
__in_z const WCHAR * const wszBaseName,
Const ULONGulFlags = NO_FLAGS
);
An error code from the ERR enumeration.
The ErrInit function registers the databases and log files that are to be checked. This function must be called after the New function is called but before any other ChkSGFiles function is called.
You must provide all the database names, the log file path, and the base name as null-terminated Unicode strings.
You can check only the database files, only the log files, or both the database and log files. However, when calling this function, the application must specify at least one entity to be checked. Passing 0 (zero) for cDB and NULL for wszLogPath will return an error.
If the value of cDB is other than 0 (zero), passing NULL for rgwszDb will result in an error. To check the database files, the application must provide the database names.
If NULL is passed for wszBaseName but wszLogPath is not NULL, an error will be returned. A log file base name is always required when checking log files.
If you're using CHKSGFILES in a multithreaded application, you must call the ErrInit function in the single-threaded portion of the application, and you can call it only once for each CCheckSGFiles object.