Directory Services

IDsDisplaySpecifier::GetFriendlyAttributeName

The IDsDisplaySpecifier::GetFriendlyAttributeName method retrieves from the localized name of an attribute of a given object class.

HRESULT GetFriendlyAttributeName( 
  LPCWSTR pszObjectClass,
  LPCWSTR pszAttributeName,
  LPWSTR pszBuffer,
  UINT cchBuffer
);

Parameters

pszObjectClass
[in] Pointer to a null-terminated Unicode string that contains the name of the object class to obtain the localized attribute name for. Examples of the object class name are "user" and "container".
pszAttributeName
[in] Pointer to a null-terminated Unicode string that contains the name of the attribute to obtain the localized name for.
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

This method looks up the display specifier of the class to check the attributeNames property for an attribute name pair that matches the given attribute name. If no match is found, the input attribute name is returned.

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

Active Directory Display Interfaces, IDsDisplaySpecifier