IGPEInformation::GetHint method

The GetHint method retrieves the type of Active Directory object to which this GPO can be linked.

Syntax

HRESULT GetHint(
  GROUP_POLICY_HINT_TYPE *gpHint
);

Parameters

gpHint

Receives the directory service type. This parameter can be one of the following values.

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 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

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

  • As an extension to the Active Directory Manager. Navigate to the site, domain, or organizational unit, then select Group Policy.
  • As a stand-alone MMC tool with a specific link.
  • As a stand-alone MMC tool without a specific link.
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 version Windows Vista Windows Server 2008
Target Platform Windows
Header gpedit.h
DLL Gpedit.dll

See Also

Group Policy Interfaces

Group Policy Overview

IGPEInformation