HrESEBackupRestoreGetNodes Function

Topic Last Modified: 2006-06-12

The HrESEBackupRestoreGetNodes function returns a tree of nodes that lists the Microsoft® Exchange Server 2007 computers in the current domain that can be backed up or restored.

Applies To

ESEbcli2 DLL Functions Interface

Syntax

HRESULT HrESEBackupRestoreGetNodes
(
        wchar* wszComputerName,
        BACKUP_NODE_TREE* pBackupNodeTree
);

Parameters

  • wszComputerName
    Input parameter. This is the server to retrieve the tree information from. To start with the local computer, this parameter should be NULL.
  • pBackupNodeTree
    Output parameter. Pointer to a tree of nodes. Each node in the tree has the structure of type BACKUP_NODE_TREE Structure.

Return Value

The following return codes can be returned. To retrieve the error string for an Exchange Storage Engine (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 nodes returned in the tree pointed to by pBackupNodeTree can be either computers running Exchange, or Exchange virtual servers. Computers are distinguished by having the BACKUP_NODE_TYPE_MACHINE flag.

The tree returned in pBackupNodeTree consists of a top-level node having wszName equal to "Microsoft Exchange", and it will have no siblings. If there is at least one Exchange server available for backup or restore, the Microsoft Exchange node will have a child node, named for the first server. If there are additional servers, they will appear as siblings of the first server node.

After use, the structure pointed to by the pBackupNodeTree return parameter must be freed by calling the ESEBackupRestoreFreeNodes Function.

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