HrESERestoreOpen Function

Topic Last Modified: 2006-06-12

The HrESERestoreOpen function opens the connection to Microsoft® Exchange Server 2007 . 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

HRESULT HrESERestoreOpen
(
        wchar* wszBackupServer,
        wchar* wszBackupAnnotation,
        wchar* wszSrcInstanceName,
        wchar* wszRestoreLogPath,
        HCCX* phccxRestoreContext
);

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.