HrESERestoreAddDatabaseNS Function

Topic Last Modified: 2006-06-12

The HrESERestoreAddDatabaseNS function informs the Exchange Storage Engine (ESE) that the specified database is to be restored. This function, or HrESERestoreAddDatabase, must be called for each database in the storage group that is being restored.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

HRESULT HrESERestoreAddDatabaseNS
(
        HCCX phccxRestoreContext,
        wchar* wszDatabaseDisplayName,
        GUID guidDatabase,
        wchar* wszDatabaseStreamsS,
        wchar* wszDatabaseStreamsD
);

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.
  • wszDatabaseDisplayName
    Input parameter. The display name of the database to be restored.
  • wszDatabaseStreamsS
    Input parameter. A buffer containing NULL-separated strings specifying the source stream files. The last stream file name must be followed by two NULL characters.
  • wszDatabaseStreamsD
    Input parameter. A buffer containing NULL-separated strings specifying the destination stream files for the database. The last stream file name is followed by two NULL characters.

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

The function HrESERestoreAddDatabase requests that the ESE provide the destination file names in the wszDatabaseStreamsD parameter. This function provides the destination file name array to the server. Use the function most appropriate to the operation. If the application is restoring the database to the original location, use the HrESERestoreAddDatabase function. If the application is restoring the database to a different location, use this function.