IGPMDomain2::LoadStarterGPO method (gpmgmt.h)

Opens a Starter Group Policy object (GPO) cabinet (CAB) file and imports it into the domain.

Syntax

HRESULT LoadStarterGPO(
  BSTR         bstrLoadFile,
  VARIANT_BOOL bOverwrite,
  VARIANT      *pvarGPMProgress,
  VARIANT      *pvarGPMCancel,
  IGPMResult   **ppIGPMResult
);

Parameters

bstrLoadFile

Required. Name of the CAB file to load. Use a null-terminated string.

bOverwrite

Determines whether to overwrite any existing versions of the Starter GPO. Loading a Starter GPO from a CAB retains the ID of the original Starter GPO used to create the CAB, therefore it is possible to have a version of the Starter GPO already existing in the domain when the LoadStarterGPO method is called.

VARIANT_FALSE

Do not overwrite an existing Starter GPO.

VARIANT_TRUE

Overwrite an existing Starter GPO.

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 load operation. That interface contains pointers to an IGPMStarterGPO interface and to an IGPMStatusMsgCollection interface.

Return value

C++

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

JScript

Returns a reference to a GPMResult object.

VB

Returns a reference to a GPMResult object.

Requirements

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

See also

IGPMDomain2