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 the format of a distinguished name.

typedef 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_PRINCIPAL_NAME = 11, 
  ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME = 12
} ADS_NAME_TYPE_ENUM;

Values

ADS_NAME_TYPE_1779
Name format as specified in RFC 1779. For example, "CN=Jeff Smith,CN=users, DC=Fabrikam, DC=com".
ADS_NAME_TYPE_CANONICAL
Canonical name format. For example, "Fabrikam.com/Users/Jeff Smith".
ADS_NAME_TYPE_NT4
Account name format used in Microsoft® Windows NT® 4.0. For example, "Fabrikam\JeffSmith".
ADS_NAME_TYPE_DISPLAY
Display name format. For example, "Jeff Smith".
ADS_NAME_TYPE_DOMAIN_SIMPLE
Simple domain name format. For example, "JeffSmith@Fabrikam.com".
ADS_NAME_TYPE_ENTERPRISE_SIMPLE
Simple enterprise name format. For example, "JeffSmith@Fabrikam.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 estimate the format. This element is a meaningful option only with IADsNameTranslate::Set or ::SetEx, but not ::Get or ::GetEx.
ADS_NAME_TYPE_USER_PRINCIPAL_NAME
User principal name format. For example, "JeffSmith@Fabrikam.com".
ADS_NAME_TYPE_CANONICAL_EX
Extended canonical name format. For example, "Fabrikam.com/Users Jeff Smith".
ADS_NAME_TYPE_SERVICE_PRINCIPAL_NAME
Service principal name format. For example, "www/www.fabrikam.com@fabrikam.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.

Remarks

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

Because VBScript cannot read data from a type library, an application must use the appropriate numeric constants, instead of the symbolic constants, to set the appropriate flags. To use the symbolic constants as a good programming practice, write explicit declarations of such constants, as done here, in your VBScript applications.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.

See Also

ADSI Enumerations, IADsNameTranslate, Security Descriptor String Format