Directory Services

DsGetFriendlyClassName

The DsGetFriendlyClassName function retrieves the localized name for an object class. This function is obsolete. New applications should use the IDsDisplaySpecifier::GetFriendlyClassName method to perform this function.

HRESULT DsGetFriendlyClassName(
  LPWSTR 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] 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 function 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.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Dsclient.h.
Library: Use Dsuiext.lib.

See Also

IDsDisplaySpecifier::GetFriendlyClassName