Platform SDK: Active Directory, ADSI, and Directory Services

DsRestoreRegister

The DsRestoreRegister function registers a restore operation. It will interlock all subsequent restore operations and prevent the restore target from starting until the call to the DsRestoreRegisterComplete function is made.

HRESULT DsRestoreRegister(
  HBC hbc,
  LPCWSTR szCheckPointFilePath,
  LPCWSTR szLogPath,
  EDB_RSTMAP rgrstmap[], 
  LONG crstmap,
  LPCWSTR szBackupLogPath,
  ULONG genLow,
  ULONG genHigh
);

Parameters

hbc
[in] The client context handle of the restore.
szCheckPointFilePath
[in] The path to the checkpoint file. Typically the same as the system database path. If this parameter is NULL, DsRestoreRegister uses the checkpoint file derived from the backup logs.
szLogPath
[in] The path to the log files on the disk. If the path leads to an empty directory, new log files are generated there. This parameter cannot be NULL.
rgrstmap
[in] An EDB_RSTMAP structure containing the old and new paths for each database. There should be one row (of two elements) for each database. For the directory, there is a row for the system database and a row for the directory database. The order of the rows does not matter. The crstmap parameter specifies the number of rows.
crstmap
[in] This is a LONG specifying the number of rows in rgrstmap.
szBackupLogPath
[in] The path to the directory where the log files are restored. This parameter can be the same as the szLogPath parameter. DsRestoreRegister also puts the patch file into this directory. This parameter cannot be NULL.
genLow
[in] Lowest log number that was restored in this restore session.

The lowest log file number that is restored. This is a hexadecimal number in the range from 0x00000 to 0xFFFFF.

genHigh
[in] Highest log number that was restored in this restore session.

The highest log file number that is restored. This is a hexadecimal number in the range from 0x00000 to 0xFFFFF.

Return Values

One of the standard HRESULT success codes; otherwise a failure code.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntdsbcli.h.
  Library: Included as a resource in Ntdsbcli.dll.
  Unicode: Implemented as Unicode and ANSI versions on Windows 2000.

See Also

Backing Up and Restoring Active Directory, Directory Backup Functions, DsRestoreRegisterComplete, EDB_RSTMAP