3.1.4.10.2 IWbemBackupRestore::Restore (Opnum 4)

On the IWbemBackupRestore::Restore method invocation, the server MUST restore the contents of the CIM database.

 HRESULT Restore(
   [in, string] LPCWSTR strRestoreFromFile,
   [in] long lFlags
 );

strRestoreFromFile: MUST be a UTF-16 string that MUST contain the name of the file from which to restore the CIM database. This parameter MUST NOT<60> be NULL.

lFlags: Flags that affect the behavior of the Restore method. The flags' behavior MUST be interpreted as specified in the following table.

Value

Meaning

WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN

0x00000001

If the bit is not set and if there are any active clients, the server MUST NOT perform the restore.

If the bit is set, the server MUST shut down any active clients before performing the restore operation.

Return Values: This method MUST return an HRESULT value that MUST indicate the status of the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the successful completion of the method.

If the WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN flag is not set, the server MUST return WBEM_E_INVALID_PARAMETER.

In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.

WBEM_S_NO_ERROR (0x00)

In response to the IWbemBackupRestore::Restore method, the server MUST set the RestoreInProgress flag to True. The server MUST go through each entry in NamespaceConnectionTable and delete the corresponding NamespaceConnection object. The server MUST restore the CIM database from the file that is specified in the strRestoreFromFile parameter. The server SHOULD<61> verify that the security principal making the call is allowed to restore the CIM database using implementation-specific authorization policy. If the security principal is not authorized, the server MUST return WBEM_E_ACCESS_DENIED.

The server MUST re-initialize the NamespaceConnectionTable with NamespaceConnection objects after the CIM database restoration is complete.

After the Restore operation is complete, the server MUST reset the RestoreInProgress flag to False.