IGroupPolicyObject::GetDisplayName method (gpedit.h)

The GetDisplayName method retrieves the display name for the GPO.

Syntax

HRESULT GetDisplayName(
  [out] LPOLESTR pszName,
  [in]  int      cchMaxLength
);

Parameters

[out] pszName

Pointer to a buffer that receives the display name.

[in] cchMaxLength

Specifies the size, in characters, of the pszName 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.

Remarks

To set the display name for a GPO, you can call the SetDisplayName method. Call GetName to retrieve the unique name for a GPO, which is a GUID for an Active Directory object.

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

GetName

Group Policy Interfaces

Group Policy Overview

IGroupPolicyObject

SetDisplayName