Directory Services


The DsBackupOpenFile function opens the specified file and performs the client and server operations that are necessary to prepare the file for backup.

HRESULT DsBackupOpenFile(
  HBC hbc,
  LPCTSTR szAttachmentName,
  DWORD cbReadHintSize,
  LARGE_INTEGER* pliFileSize


[in] Contains the backup handle provided by DsBackupPrepare.
[in] Pointer to a null-terminated string that specifies the name of the back up file to open.
[in] Contains the possible size, in bytes, of the buffer passed as the pvBuffer argument in the DsBackupRead function. This value must be a multiple of 4096. The backup functions use this value as a hint to optimize the network traffic.
[out] Pointer to a LARGE_INTEGER value that receives the size, in bytes, of the back up file opened.

Return Values

Returns S_OK if successful or a Windows or RPC error code otherwise.


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Ntdsbcli.h.
Library: Use Ntdsbcli.lib.

See Also

DsBackupRead, Directory Backup Functions, Backing Up and Restoring Active Directory