CertSrvRestoreRegisterThroughFile function (certbcli.h)

The CertSrvRestoreRegisterThroughFile function registers a Certificate Services restore.

Syntax

HRESULT CERTBCLI_API CertSrvRestoreRegisterThroughFile(
  [in]           HCSBC            hbc,
  [in, optional] WCHAR const      *pwszCheckPointFilePath,
  [in, optional] WCHAR const      *pwszLogPath,
  [in, optional] CSEDB_RSTMAPW [] rgrstmap,
  [in]           LONG             crstmap,
  [in, optional] WCHAR const      *pwszBackupLogPath,
  [in]           ULONG            genLow,
  [in]           ULONG            genHigh
);

Parameters

[in] hbc

A handle to the Certificate Services restore context. This handle is obtained by calling the CertSrvRestorePrepare function.

[in, optional] pwszCheckPointFilePath

A pointer to a null-terminated Unicode string that contains the restore path for the check point file. Pass NULL for this parameter if it is not needed.

[in, optional] pwszLogPath

A pointer to a null-terminated Unicode string that contains the current log file directory. Pass NULL for this parameter if it is not needed.

[in, optional] rgrstmap

An array of CSEDB_RSTMAP structures that contains the restore map. If you are performing a full database restoration, this parameter specifies the name of the backup database, as well as a new name for the database after it is restored. The backup database name is referenced by the pwszDatabaseName member, and the new database name is referenced by the pwszNewDatabaseName member. If the intent is to maintain the same name for both the backup database and the restored database, set both the pwszNewDatabaseName and the pwszDatabaseName members to the same name. The backup database name is constructed from the path returned by the backup client's call to the CertSrvRestoreGetDatabaseLocations function. CertSrvRestoreGetDatabaseLocations would have been called during a full backup, and the backup client would have saved the returned path.

If you are performing an incremental restoration, set this parameter to NULL.

[in] crstmap

The number of elements in the rgrstmap array. Set this value to one if a you are performing a full restoration, or zero if you are performing an incremental restoration.

[in, optional] pwszBackupLogPath

A pointer to a null-terminated Unicode string that contains the path for the backup log directory. Pass NULL for this parameter if it is not needed.

[in] genLow

The lowest log number that was restored in this restore session. Log files are in the form of edbXXXXX.log, where XXXXX is a five hexadecimal digit value. For example, edb00001.log is the first log file created by the internal database. For purposes of this function, a value of one in genLow corresponds to the log file edb00001.log.

[in] genHigh

The highest log number that was restored in this restore session.

Return value

The return value is an HRESULT. A value of S_OK indicates success.

Remarks

This function is identical to the CertSrvRestoreRegister function except that CertSrvRestoreRegister requires the calling account to be a local administrator. The CertSrvRestoreRegisterThroughFile function only requires that the calling account have the restore privilege.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header certbcli.h (include Certsrv.h)
Library Certadm.lib
DLL Certadm.dll

See also

CertSrvRestoreRegister

CertSrvRestoreRegisterComplete

Using the Certificate Services Backup and Restore Functions