Windows Dev Center

IWbemBackupRestore::Backup method

The IWbemBackupRestore::Backup method backs up the contents of the static repository to a separate file.

Syntax


HRESULT Backup(
  [in] LPCWSTR strBackupToFile,
  [inlong    lFlags
);

Parameters

strBackupToFile [in]

Constant, null-terminated string of 16-bit Unicode characters that contains the file name to which to back up the contents of the repository.

lFlags [in]

Reserved. This parameter must be 0 (zero).

Return value

This method returns an HRESULT indicating the status of the method call. The following table lists the value contained within an HRESULT.

Return codeDescription
WBEM_E_INVALID_PARAMETER

One of the arguments is not valid.

WBEM_E_ACCESS_DENIED

User does not have the right to perform this. For more information, see Maintaining WMI Security.

S_OK

Method succeeded.

 

Examples

The following C++ example shows how to call the IWbemBackupRestore::Backup method.


// The pInt variable is of type IWbemBackupRestore*
pInt->Backup(L"c:\\\\winnt\\system32\\wbem\\repository\\back.x", 0);

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Wbemsvc.dll

 

 

Show:
© 2015 Microsoft