Platform SDK: Active Directory, ADSI, and Directory Services

ADS_NAME_TYPE_ENUM

The ADS_NAME_TYPE_ENUM enumeration specifies the formats used for representing distinguished names. It is used by the IADsNameTranslate interface to convert distinguished names from one format to another.

enum {
  ADS_NAME_TYPE_1779                    =  1,
  ADS_NAME_TYPE_CANONICAL               =  2,
  ADS_NAME_TYPE_NT4                     =  3,
  ADS_NAME_TYPE_DISPLAY                 =  4,
  ADS_NAME_TYPE_DOMAIN_SIMPLE           =  5,
  ADS_NAME_TYPE_ENTERPRISE_SIMPLE       =  6,
  ADS_NAME_TYPE_GUID                    =  7,
  ADS_NAME_TYPE_UNKNOWN                 =  8,
  ADS_NAME_TYPE_USER_PRINCIPAL_NAME     =  9,
  ADS_NAME_TYPE_CANONICAL_EX            = 10,
  ADS_NAME_TYPE_SERVICE_PRINCPAL_NAME   = 11,
  ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME = 12
  } ADS_NAME_TYPE_ENUM;

Elements

ADS_NAME_TYPE_1779
Name format as specified in RFC 1779. For example, "CN=Jane Doe,CN=users, DC=Microsoft, DC=com".
ADS_NAME_TYPE_CANONICAL
Canonical name format. For example, "Microsoft.com/Users/Jane Doe".
ADS_NAME_TYPE_NT4
Account name format used in Microsoft® Windows NT® 4.0. For example, "Microsoft\JaneDoe".
ADS_NAME_TYPE_DISPLAY
Display name format. For example, "Jane Doe".
ADS_NAME_TYPE_DOMAIN_SIMPLE
Simple domain name format. For example, "JaneDoe@Microsoft.com".
ADS_NAME_TYPE_ENTERPRISE_SIMPLE
Simple enterprise name format. For example, "JaneDoe@Microsoft.com".
ADS_NAME_TYPE_GUID
Global Unique Identifier format. For example, {95ee9fff-3436-11d1-b2b0-d15ae3ac8436}.
ADS_NAME_TYPE_UNKNOWN
Unknown name type. The system will try to make the best guess.
ADS_NAME_TYPE_USER_PRINCIPAL_NAME
User principal name format. For example, "JaneDoe@ArcadiayBay.com".
ADS_NAME_TYPE_CANONICAL_EX
Extended canonical name format. For example, "Microsoft.com/Users Jane Doe".
ADS_NAME_TYPE_SERVICE_PRINCPAL_NAME
Service principal name format. For example, "www/www.microsoft.com@microsoft.com"
ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME
A SID string, as defined in the Security Descriptor Definition Language (SDDL), for either the SID of the current object or one from the object's SID history. For example, "O:AOG:DAD:(A;;RPWPCCDCLCSWRCWDWOGA;;;S-1-0-0)" For more information see "Security Descriptor String Format" under "Security" in the Microsoft Platform SDK documentation.

Remarks

Code examples written in C++, Visual Basic, and VBS/ASP can be found in the discussions of the IADsNameTranslate interface.

Note  Because VBScript cannot read information from a type library, a  application must use the appropriate numerical constants, instead of the symbolic constants, to set the appropriate flags. If you want to use the symbolic constants as a good programming practice, you should make explicit declarations of such constants, as done here, in your VBScript applications.

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
  Windows 95/98: Requires Windows 95 or later (with DSClient).
  Header: Declared in Iads.h.

See Also

ADSI Enumerations, IADsNameTranslate, Security Descriptor String Format