IGroupPolicyObject::OpenDSGPO method (gpedit.h)
The OpenDSGPO method opens the specified GPO and optionally loads the registry information.
Syntax
HRESULT OpenDSGPO(
[in] LPOLESTR pszPath,
[in] DWORD dwFlags
);
Parameters
[in] pszPath
Specifies the Active Directory path of the object to open. If the path specifies a domain controller, the GPO is created on that DC. Otherwise, the system will select a DC on the caller's behalf.
[in] dwFlags
Specifies whether or not the registry information should be loaded for the GPO. This parameter can be one of the following values.
GPO_OPEN_LOAD_REGISTRY
Load the registry information.
GPO_OPEN_READ_ONLY
Open the GPO in read-only mode.
Return value
If the method succeeds, the return value is S_OK. Otherwise, the method returns one of the COM error codes defined in the Platform SDK header file WinError.h.
Remarks
To create a new GPO in the Active Directory, you can call the New method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | gpedit.h |
DLL | Gpedit.dll |