Share via


HrESERestoreWriteFile Function

HrESERestoreWriteFile Function

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The HrESERestoreWriteFile function writes data to the specified database file.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

[C++]HRESULT HrESERestoreWriteFile (     HCCX phccxRestoreContext,     voidhFile,     voidpvBuffer,     unsigned long cbBuffer );

Parameters

  • phccxRestoreContext
    Input parameter. A handle to a restore context. The handle is passed to the various restore functions, and contains information about the current restore operations.
  • hFile
    Input parameter. A file handle for the file being restored, returned in the first element of the rghfile parameter returned by the HrESERestoreOpenFile Function.
  • pvBuffer
    Input parameter. The buffer into which data has been placed. The buffer must be at least as large (in bytes) as specified by the cbBuffer parameter.
  • cbBuffer
    The size, in bytes, of the buffer pointed to by pvBuffer.

Return Value

The following return codes can be returned. To retrieve the error string for an Exchange Storage Engine (ESE) error, use the standard FormatMessage function. For the general errors hrErrorFromESECall and hrErrorFromCallbackCall, more information about the error is available using the standard GetLastError function.

S_OK Success.
ESE-specific error codes ESE-specific error codes, as defined in esebkmsg.h.
Other Other Microsoft Win32 or remote procedure call (RPC) errors.

Remarks

Important  Always ensure that the application calculates the size of pvBuffer correctly. The cbBuffer parameter specifies the size in bytes. If the cbBuffer value incorrectly indicates that the buffer is larger than it really is, the ESE may overwrite adjacent memory, causing the application to encounter memory access violations and behave unexpectedly.

To close the file, call the HrESERestoreCloseFile Function.

Applications that use this function must be run under a user account that has Microsoft Windows server operating systems Backup and Restore privileges.

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.