HrBackupRead

The HrBackupRead function reads one block from a backup file.

Quick Info

Header file: EDBBCLI.H
Library: EDBBCLI.LIB

HRESULT HrBackupRead(
  HBC pvBackupContext,  
  PVOID pvBuffer,       
  DWORD cbBuffer,       
  PDWORD pcbRead        
);
 

Parameters

pvBackupContext
Input parameter. Points to the client-side context handle of the backup.
pvBuffer
Input parameter. Points to the buffer in which to hold the data being backed up.
cbBuffer
Input parameter. Specifies the size of the buffer where pvBuffer points. If the communication protocol is not TCP/IP, this value must be a multiple of 4096 bytes.
pcbRead
Output parameter. Points to the number of bytes read.

Note The number of bytes read, pcbRead, may be less than the size of the buffer, cbBuffer. This does not indicate an error. Some transports fragment the buffer being transmitted instead of filling the entire buffer with data.

Return Values

See Return Values.

Remarks

Your application must allocate the space for the buffer where pvBuffer points and release this space with a call to BackupFree when you are finished with the buffer.

If the client or server cannot communicate via TCP/IP, the buffer must be a multiple of 4096 bytes. If your application does not use buffer sizes that are a multiple of 4096 bytes or the TCP/IP communication protocol, HrBackupRead fails.

For more information on this function, see Backing Up and Restoring Data.

See Also

HrBackupOpenFile