Platform SDK: Group Policy

IGroupPolicyObject::SetOptions

Sets the options for the GPO.

HRESULT SetOptions(
  DWORD dwOptions,
  DWORD dwMask
);

Parameters

dwOptions
Specifies the new option values. This parameter can be the following option.
Value Meaning
GPO_OPTION_DISABLE_USER The user portion of the GPO is disabled.
GPO_OPTION_DISABLE_MACHINE The computer portion of the GPO is disabled.

dwMask
The options to change. This parameter can be the following option.
Value Meaning
GPO_OPTION_DISABLE_USER The user portion of the GPO is disabled.
GPO_OPTION_DISABLE_MACHINE The computer portion of the GPO is disabled.

Return Values

If the function succeeds, the return value is S_OK. Otherwise, the function returns one of the COM error codes defined in the Platform SDK header file WinError.h.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Gpedit.h.

See Also

Group Policy Overview, Group Policy Interfaces, IGroupPolicyObject