Platform SDK: Group Policy

IGroupPolicyObject::GetDSPath

Retrieves the Active Directory path to the root of the specified GPO section.

HRESULT GetDSPath(
  DWORD dwSection,
  LPOLESTR pszPath,
  int cchMaxPath
);

Parameters

dwSection
Specifies the GPO section. This parameter can be one of the following values.
Value Meaning
GPO_SECTION_USER User section
GPO_SECTION_MACHINE Computer section

pszPath
Pointer to a buffer that receives the path, in ADSI format (LDAP://cn=user, ou=users,dc=coname,dc=com).
cchMaxPath
Specifies the maximum number of characters that can be stored in the pszPath buffer.

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