Share via


HrESERestoreOpen Function

HrESERestoreOpen 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 HrESERestoreOpen function opens the connection to Microsoft Exchange Server 2003. The Exchange Storage Engine (ESE) returns a context handle, and the restore log path if none is specified.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

[C++]HRESULT HrESERestoreOpen (     wcharwszBackupServer,     wcharwszBackupAnnotation,     wcharwszSrcInstanceName,     wcharwszRestoreLogPath,     HCCXphccxRestoreContext );

Parameters

  • wszBackupServer
    Input parameter. Specifies the Network Basic Input/Output System (NetBIOS) name of the computer to be restored.
  • wszBackupAnnotation
    Input parameter. The service annotation of the server being restored. This is limited to the information store ("Microsoft Information Store"), the Site Replication service ("Microsoft Site Replication Service"), and the Key Management service ("Microsoft Key Management Service").
  • wszSrcInstanceName
    Input parameter. The name of the ESE instance that was using the service when the backup was made.
  • wszRestoreLogPath
    Inout parameter. The location where the application will restore the log and patch files, and where the restore environment file will be stored. If this parameter is set to NULL, Exchange will specify a path for the application to use.
  • phccxRestoreContext
    Output parameter. A handle to a restore context. The handle is passed to the various restore functions, and contains information about the current restore operations.

Return Value

The following return codes can be returned. To retrieve the error string for an 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

After finishing the restore operations, the application should call the HrESERestoreClose Function to close the connection and free the memory allocated by HrESERestoreOpen.

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.