IGroupPolicyObject::OpenLocalMachineGPO method

The OpenLocalMachineGPO method opens the default GPO for the computer and optionally loads the registry information.

Syntax

HRESULT OpenLocalMachineGPO(
  DWORD dwFlags
);

Parameters

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 open the default GPO for a remote computer, you can call the OpenRemoteMachineGPO method.

Requirements

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header gpedit.h
DLL Gpedit.dll

See Also

Group Policy Interfaces

Group Policy Overview

IGroupPolicyObject

OpenRemoteMachineGPO