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
- 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.
- Create the string that represents the attribute display name. For an example, see the format above.
- Use the IADs::PutEx method with the lnControlCode parameter set to ADS_PROPERTY_APPEND to add the new value.
- Call IADs::SetInfo to commit the changes to the directory.
For more information about naming new classes and attributes, see Naming Attributes and Classes.