다음을 통해 공유


HrESERestoreReopen Function

Topic Last Modified: 2006-06-12

The HrESERestoreReopen function opens the connection to Microsoft® Exchange Server 2007 , and loads the restore environment from the folder specified in wszRestoreLogPath. The Exchange Storage Engine (ESE) returns a context handle.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

HRESULT HrESERestoreReopen
(
        wchar* wszBackupServer,
        wchar* wszBackupAnnotation,
        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 that is 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").
  • wszRestoreLogPath
    Input parameter. The location where the application will restore the log and patch files, and where the restore environment file is stored.
  • 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

Use this function when restoring a database that requires multiple restore sessions before the ESE can be allowed to recover the database state. This function is needed, for example, when restoring both a full backup and an incremental backup for a database.

The application must supply the wszRestoreLogPath parameter. This folder must contain an appropriate restore context file, which will be read by this function.

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

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