MprConfigServerRestore

The MprConfigServerRestore function restores the router-manager, interface, and phone-book configuration from a backup created by a previous call to MprConfigServerBackup.

DWORD MprConfigServerRestore(
  HANDLE hMprConfig,  // handle to the router configuration
  LPWSTR lpwsPath     // path to backup directory
);

Parameters

hMprConfig,
[in] Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
lpwsPath
[in] Pointer to a Unicode string that specifies the path to the directory in which to write the backup files. This path should end with a trailing backslash.

Return Values

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_INVALID_PARAMETER The hMprConfig parameter is NULL.
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
Other Use FormatMessage to retrieve the system error message that corresponds to the error code returned.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Mprapi.h.
  Library: Use Mprapi.lib.

See Also

Router Management Reference, Router Configuration Functions, FormatMessage, MprConfigServerBackup, MprConfigServerConnect