Platform SDK: Active Directory, ADSI, and Directory Services

DsBackupOpenFile

The DsBackupOpenFile function opens the remote file to back up and performs whatever client and server operations are necessary to prepare for the backup.

HRESULT DsBackupOpenFile(
  HBC hbc,
  LPCWSTR szAttachmentName,
  DWORD cbReadHintSize,
  LARGE_INTEGER *pliFileSize
);

Parameters

hbc
[in] Points to the client context handle of the backup.
szAttachmentName
[in] Specifies the name of the file to back up.
cbReadHintSize
[in] Size of the buffer (in 4096-byte multiples) that is passed as the pvBuffer argument to DsBackupRead. The backup functions use this value to optimize the network traffic.
pliFileSize
[out] Pointer to a large integer that will receive the size (in bytes) of the file (specified by szAttachmentName) to back up.

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, DsBackupRead