大网数据广告活动
域与目录服务

Class and Attribute Display Names

· 52CE 我爱测

This topic contains information about and guidelines for class and attribute display names.

The display specifier for an object class contains the following attributes that can be used to specify the localized display names used in the UI for objects of that class:

  • The classDisplayName attribute is a single-value Unicode string that specifies the class display name.
  • The attributeDisplayNames attribute is a multi-value property that specifies the names to use in the UI for attributes of the object class.

The attributeDisplayNames values are Unicode strings; each element consists of a comma-delimited name pair:

<attribute name>,<display text>

In this example, "<attribute name>" is the lDAPDisplayName of the attribute and "<display text>" is the text to display as the name of that attribute in the user interface.

Guidelines for Class and Attribute Display Names

Because many vendors may extend classes with new attributes or creating entirely new classes, it is important that the class and attribute display names are unambiguous and do not result in conflicts.

Each vendor should prefix the class display name with a unique friendly identifier based on the vendor name. For example, if the fictitious company, Fabrikam Inc., creates a new class derived from the "contact" class, they can have a unique class display name "Fabrikam Contact."

If a vendor extends an existing class with new attributes, they should again uniquely identify the attribute display name so that no conflicts occur with other attribute display names. Again, prefixing the attribute display name with unique friendly identifier based on the vendor name is good practice. For example, if the Fabrikam company extends the user class with a new HR attribute, they could uniquely display the attribute as "Fabrikam HR Information."

In addition, from a localization perspective, each vendor should localize the class and attribute display names into each language supported by Windows 2000.

Adding a Value to the attributeDisplayNames Attribute

To add a name mapping value to the attributeDisplayNames attribute

  1. Determine if the name mapping value for the attribute exists. If a name mapping value is to be replaced, first deleted the existing value, using the IADs::PutEx method, with the lnControlCode parameter set to ADS_PROPERTY_DELETE and the vProp parameter set to the value to be removed. Do not use ADS_PROPERTY_CLEAR or ADS_PROPERTY_UPDATE for lnControlCode.
  2. Create the string that represents the attribute display name. For an example, see the format above.
  3. Use the IADs::PutEx method with the lnControlCode parameter set to ADS_PROPERTY_APPEND to add the new value.
  4. Call IADs::SetInfo to commit the changes to the directory.

For more information about naming new classes and attributes, see Naming Attributes and Classes.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。