IGPMStarterGPO::Backup method (gpmgmt.h)

Creates a backup of the current Starter GPO.

Syntax

HRESULT Backup(
  [in]            BSTR       bstrBackupDir,
  [in]            BSTR       bstrComment,
  [in, optional]  VARIANT    *pvarGPMProgress,
  [out, optional] VARIANT    *pvarGPMCancel,
  [out]           IGPMResult **ppIGPMResult
);

Parameters

[in] bstrBackupDir

Name of the file system directory in which the GPMStarterGPOBackup object should be stored. The directory must already exist. Use a null-terminated string.

[in] bstrComment

Comment to associate with the GPMStarterGPOBackup object.

[in, optional] pvarGPMProgress

Specifies a pointer to an IGPMAsyncProgress interface that allows the client to receive status notifications about the progress of the backup operation. The method runs synchronously if this parameter is NULL. The method runs asynchronously if this parameter is not NULL. This parameter must be NULL if the client should not receive asynchronous notifications.

[out, optional] pvarGPMCancel

Receives a pointer to an IGPMAsyncCancel interface that the client can use to cancel the backup operation. This parameter is not returned if pvarGPMProgress is NULL.

[out] ppIGPMResult

Address of a pointer to the IGPMResult interface representing the result of the backup operation. That interface contains pointers to an IGPMBackup interface and an IGPMStatusMsgCollection interface.

Return value

Returns S_OK if successful. Returns a failure code if an error occurs.

For more information, see the following Remarks section.

Remarks

Note that you must check the code returned by the IGPMResult::OverallStatus method as well as the one returned by this method to determine whether or not the operation succeeded. OverallStatus returns an overall status code for the operation. If no error occurred during the operation, it returns a success code; otherwise it returns a failure code.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll

See also

IGPMStarterGPO