Platform SDK: Group Policy

IGPEInformation::GetHint

Retrieves the type of Active Directory object to which this GPO can be linked.

HRESULT GetHint(
  GROUP_POLICY_HINT_TYPE *gpHint
);

Parameters

gpHint
Receives the directory service type. This parameter can be one of the following values.
Value Meaning
GPHintUnknown No link information is available.
GPHintMachine The object can be linked to a computer (local or remote).
GPHintSite The object can be linked to a site.
GPHintDomain The object can be linked to a domain.
GPHintOrganizationalUnit The object can be linked to an organizational unit.

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.

Remarks

The Group Policy snap-in cannot determine which Active Directory objects are linked to a particular GPO. GetHint provides linking information based on how the user started the Group Policy snap-in. The Group Policy snap-in can be started in the following ways:

You may want to customize your application's user interface based on the result of calling this method. However, use this method with caution because the returned value may indicate the wrong scope.

Requirements

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

See Also

Group Policy Overview, Group Policy Interfaces, IGPEInformation