IGPMStarterGPO::CopyTo method

The CopyTo method copies the current Starter GPO and returns a pointer to the copy of the Starter GPO. The method copies all the contents of the Starter GPO but creates the new Starter GPO with the default new Starter GPO delegation settings. Copying a system Starter GPO creates a new custom Starter GPO.

Syntax

HRESULT CopyTo(
  VARIANT    *pvarNewDisplayName,
  VARIANT    *pvarGPMProgress,
  VARIANT    *pvarGPMCancel,
  IGPMResult **ppIGPMResult
);

Parameters

pvarNewDisplayName

Display name to be put on the copied Starter GPO. A display name is assigned if the VARIANT structure does not contain a BSTR, or if pvarNewDisplayName is NULL.

pvarGPMProgress

Specifies a pointer to an IGPMAsyncProgress interface that allows the client to receive status notifications about the progress of the copy operation. This parameter must be NULL if the client does not receive asynchronous notifications.

pvarGPMCancel

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

ppIGPMResult

Address of a pointer to the IGPMResult interface that represents the result of the copy operation. That interface contains pointers to an IGPMGPO 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

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll

See Also

IGPMStarterGPO