다음을 통해 공유


HrESEBackupPrepare Function

Topic Last Modified: 2006-06-12

The HrESEBackupPrepare function opens the connection to Microsoft® Exchange Server 2007 . The Exchange server returns information about the storage groups that can be backed up.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

HRESULT HrESEBackupPrepare
(
        wchar* wszBackupServer,
        wchar* wszBackupAnnotation,
        unsigned long* pcInstanceInfo,
        INSTANCE_BACKUP_INFO* paInstanceInfo,
        HCCX* phccxBackupContext
);

Parameters

  • wszBackupServer
    Input parameter. Specifies the Network Basic Input/Output System (NetBIOS) name of the computer to be backed up.
  • wszBackupAnnotation
    Input parameter. The service annotation of the server being backed up. 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").
  • pcInstanceInfo
    Output parameter. The number of items returned in the paInstanceInfo array, and in the phccxBackupContext handle. This is also the number of Exchange Storage Engine (ESE) instances running on the server.
  • paInstanceInfo
    Output parameter. A pointer to an array of structures listing the Exchange storage groups controlled by the server. Each element in the array is a structure of type INSTANCE_BACKUP_INFO Structure.
  • phccxBackupContext
    Output parameter. A handle to a backup context. The handle is passed to the various backup functions, and contains information about the current backup 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

This function returns only storage groups that are currently mounted by Exchange.

After finishing the backup operations, the application should call the ESEBackupFreeInstanceInfo Function to free the memory allocated by HrESEBackupPrepare. To disconnect from the server, the application should call the HrESEBackupEnd Function.

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