IGPMStarterGPO::CopyTo method (gpmgmt.h)
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.
HRESULT CopyTo( [in, optional] VARIANT *pvarNewDisplayName, [in, optional] VARIANT *pvarGPMProgress, [in, optional] VARIANT *pvarGPMCancel, [out] IGPMResult **ppIGPMResult );
[in, optional] 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.
[in, optional] 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.
[in, optional] 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.
Returns S_OK if successful. Returns a failure code if an error occurs.
For more information, see the following Remarks section.
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.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|