Platform SDK: Active Directory, ADSI, and Directory Services

Class and Attribute Display Names

A display specifier object for an object class has two attributes that you can use to specify the display names used in the UI for objects of that class.

The attributeDisplayNames values are Unicode strings, with each element consisting of a comma delimited name pair:

attrName,DisplayText

In this example, attrName is the lDAPDisplayName of an attribute and DisplayText is the text to display as the label (name) of that attribute in the user interface.

Guidelines for Class and Attribute Display Names

Since many vendors may be extending 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's name. For example if the fictitious Fabrikam company creates a new class derived from the "contact" class, then they could have a unique class display name "Fabrikam Contact."

If a vendor extends an existing class with new attributes, then they should again uniquely identify the attribute display name so that there are no conflicts with other attribute display names. Again, prefixing the attribute display name with unique friendly identifier based on the vendor's 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"

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

Adding a Value to the attributeDisplayNames Property

When you add a value for an attribute display name to attributeDisplayNames, follow these rules:

  1. Check if a mapping for the attribute already exists. If you want to replace an existing attribute value, delete it first using IADs::PutEx method with the lnControlCode parameter set to ADS_PROPERTY_DELETE and the vProp parameter set to the value you want removed.

    Do not use ADS_PROPERTY_CLEAR or ADS_PROPERTY_UPDATE.

  2. Create the string representing the attribute display name. See the format above.
  3. To add the value, use the IADs::PutEx method with the lnControlCode parameter set to ADS_PROPERTY_APPEND so that the value will be added to the existing values (and, therefore, not overwrite the existing values). Make sure you call IADs::SetInfo to commit the change to the directory.

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