IGroupPolicyObject::GetPath method (gpedit.h)

The GetPath method retrieves the path to the GPO.

Syntax

HRESULT GetPath(
  [out] LPOLESTR pszPath,
  [in]  int      cchMaxLength
);

Parameters

[out] pszPath

Pointer to a buffer that receives the path. If the GPO is an Active Directory object, the path is in ADSI name format. If the GPO is a computer object, this parameter receives a file system path.

[in] cchMaxLength

Specifies the maximum number of characters that can be stored in the pszPath buffer.

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.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header gpedit.h
DLL Gpedit.dll

See also

GetDSPath

Group Policy Interfaces

Group Policy Overview

IGroupPolicyObject