Platform SDK: Active Directory, ADSI, and Directory Services |
The DsRestorePrepare function connects to the specified directory server and prepares it for restore.
HRESULT DsRestorePrepare( LPCWSTR szServerName, ULONG rtFlag, PVOID pvExpiryToken, DWORD cbExpiryTokenSize, HBC *phbc );
Note The server name cannot contain an underscore.
Value | Meaning |
---|---|
RESTORE_TYPE_CATCHUP | Default. The restored version is reconciled through the standard reconciliation logic so that the restored DIT can catch up with the rest of the enterprise. |
RESTORE_TYPE_AUTHORATATIVE | Not Supported. |
RESTORE_TYPE_ONLINE | Not Supported. Restoration is done when NTDS is online. |
The value of rtFlag is 0 if no special flags are specified.
One of the standard HRESULT success codes; otherwise, a failure code.
The DsRestorePrepare function requires that the caller is a member of the Administrators group on the server.
DsRestorePrepare may be used with or without a token provided. If the token is provided, it is checked for expiration, and all operations are allowed on the context returned. If the token is not provided, the context returned is restricted, and may only be used for the GetDatabaseLocations API. It may not be used for the DsRestoreRegister API.
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.
Backing Up and Restoring Active Directory, Directory Backup Functions, DsRestoreEnd, DsRestoreRegister