Directory Services

IDsDisplaySpecifier::GetFriendlyClassName

The IDsDisplaySpecifier::GetFriendlyClassName method retrieves the localized name for an object class.

HRESULT GetFriendlyClassName( 
  LPCWSTR pszObjectClass,
  LPWSTR pszBuffer,
  INT cchBuffer
);

Parameters

pszObjectClass
[in] Pointer to a null-terminated Unicode string that contains the name of the object class to obtain the name of. Examples of the object class name are "user" and "container".
pszBuffer
[in, out] Pointer to a wide character buffer that receives the name string. This buffer must be at least cchBuffer wide characters in length.
cchBuffer
[in] Contains the size of the pszBuffer buffer, in wide characters, including the terminating NULL character. If the name exceeds this number of characters, the name is truncated.

Return Values

Returns a standard HRESULT value, including the following.
Return Code Description
S_OK The method was successful.
E_FAIL An unspecified error occurred.
E_INVALIDARG One or more parameters are invalid.

Remarks

If no friendly name is set in the display specifiers for the object class, this method returns the name passed in pszObjectClass.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Header: Declared in Dsclient.h.

See Also

IDsDisplaySpecifier, Active Directory Display Interfaces