Platform SDK: Active Directory, ADSI, and Directory Services |
The DsRestoreGetDatabaseLocations function is called both at backup time as well as at restoration time to get the database locations for different types of files.
HRESULT DsRestoreGetDatabaseLocations( HBC hbc, LPWSTR *pszDatabaseLocationList, LPDWORD pcbSize );
When the array is no longer needed, the caller should use the DsBackupFree function to free the memory allocated for the array.
The first character of each name is the BFT character that indicates the file type and the rest of the name gives the path to which that particular type of file should be restored.
BFT is the bit flag used to represent file types (directory, DIT, log file, and so on). File types are represented as a character so that the character can form the first letter of the actual file name. The directory backup functions rely on the fact that values 0-256 in 8-bit ASCII map to the values 0-256 in Unicode.
Value | Meaning |
---|---|
BFT_CHECKPOINT_DIR | Path specified is the checkpoint directory. |
BFT_DATABASE_DIRECTORY | File goes into database directory. |
BFT_DIRECTORY | Path specified is a directory. |
BFT_LOG | Log file goes in the log directory. |
BFT_LOG_DIR | Path specified is the log directory. |
BFT_LOG_DIRECTORY | File goes into log directory. |
BFT_NTDS_DATABASE | Directory service database goes into database directory. |
BFT_PATCH_FILE | Patch file goes in the log directory. |
BFT_UNKNOWN | File cannot be recognized. The file does not coincide with the known file names and file types. |
One of the standard HRESULT success codes; otherwise a failure code.
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, DsBackupFree, DsBackupPrepare, DsRestorePrepare