Platform SDK: Active Directory, ADSI, and Directory Services

DsBackupGetDatabaseNames

The DsBackupGetDatabaseNames function gives the list of databases that need to be backed up for the given backup context.

HRESULT DsBackupGetDatabaseNames(
  HBC hbc,
  LPWSTR *pszAttachmentInfo,
  LPDWORD pcbSize
);

Parameters

hbc
[in] Points to the client context handle of the backup.
pszAttachmentInfo
[out] Pointer that will receive the pointer to a list of null-terminated database file names as UNC paths. The list is terminated by two-nulls (\0\0).

When the array is no longer needed, the caller should free the memory allocated for the array using DsBackupFree.

pcbSize
[out] Pointer to DWORD that specifies the number of bytes returned.

Return Values

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

Remarks

The DsBackupGetDatabaseNames function allocates a buffer of sufficient size to hold the entire attachment list. These files need to be backed up for a full backup, but not for a differential or incremental backup. In addition, the files that DsBackupGetBackupLogs returns must be backed up for a full backup.

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, DsBackupFree, DsBackupGetBackupLogs