Platform SDK: Active Directory, ADSI, and Directory Services

ADSTYPEENUM

The ADSTYPEENUM enumeration specifies data types to use to interpret an ADSI extended syntax string.

typedef enum {
  ADSTYPE_INVALID                = 0,
  ADSTYPE_DN_STRING              = 1,
  ADSTYPE_CASE_EXACT_STRING      = 2,
  ADSTYPE_CASE_IGNORE_STRING     = 3,
  ADSTYPE_PRINTABLE_STRING       = 4,
  ADSTYPE_NUMERIC_STRING         = 5,
  ADSTYPE_BOOLEAN                = 6,
  ADSTYPE_INTEGER                = 7,
  ADSTYPE_OCTET_STRING           = 8,
  ADSTYPE_UTC_TIME               = 9,
  ADSTYPE_LARGE_INTEGER          = 10,
  ADSTYPE_PROV_SPECIFIC          = 11,
  ADSTYPE_OBJECT_CLASS           = 12,
  ADSTYPE_CASEIGNORE_LIST        = 13,
  ADSTYPE_OCTET_LIST             = 14,
  ADSTYPE_PATH                   = 15,
  ADSTYPE_POSTALADDRESS          = 16,
  ADSTYPE_TIMESTAMP              = 17,
  ADSTYPE_BACKLINK               = 18,
  ADSTYPE_TYPEDNAME              = 19,
  ADSTYPE_HOLD                   = 20,
  ADSTYPE_NETADDRESS             = 21,
  ADSTYPE_REPLICAPOINTER         = 22,
  ADSTYPE_FAXNUMBER              = 23,
  ADSTYPE_EMAIL                  = 24,
  ADSTYPE_NT_SECURITY_DESCRIPTOR = 25,
  ADSTYPE_UNKNOWN                = 26,
  ADSTYPE_DN_WITH_BINARY         = 27,
  ADSTYPE_DN_WITH_STRING         = 28
  } ADSTYPEENUM;

Elements

ADSTYPE_INVALID
The data is of an invalid type.
ADSTYPE_DN_STRING
The string is of Distinguished Name (path) of a directory service object.
ADSTYPE_CASE_EXACT_STRING
The string is of the case-sensitive type.
ADSTYPE_CASE_IGNORE_STRING
The string is of the case-insensitive type.
ADSTYPE_PRINTABLE_STRING
The string is displayable on screen or in print.
ADSTYPE_NUMERIC_STRING
The string is of a numeral to be interpreted as text.
ADSTYPE_BOOLEAN
The data is of a Boolean value.
ADSTYPE_INTEGER
The data is of an integer value.
ADSTYPE_OCTET_STRING
The string is of a byte array.
ADSTYPE_UTC_TIME
The data is of the universal time as expressed in Universal Time Coordinates (UTC).
ADSTYPE_LARGE_INTEGER
The data is of a long integer value.
ADSTYPE_PROV_SPECIFIC
The string is of a provider-specific string.
ADSTYPE_OBJECT_CLASS
The string is of an object class.
ADSTYPE_CASEIGNORE_LIST
The data is of a list of case insensitive strings.
ADSTYPE_OCTET_LIST
The data is of a list of octet strings.
ADSTYPE_PATH
The string is of a directory path.
ADSTYPE_POSTALADDRESS
The string is of the postal address type.
ADSTYPE_TIMESTAMP
The data is of a time stamp in seconds.
ADSTYPE_BACKLINK
The string is of a back link.
ADSTYPE_TYPEDNAME
The string is of a typed name.
ADSTYPE_HOLD
The data is of the Hold data structure.
ADSTYPE_NETADDRESS
The string is of a net address.
ADSTYPE_REPLICAPOINTER
The data is of a replica pointer.
ADSTYPE_FAXNUMBER
The string is of a fax number.
ADSTYPE_EMAIL
The data is of an e-mail message.
ADSTYPE_NT_SECURITY_DESCRIPTOR
The data is of Windows NT®/Windows® 2000 security descriptor as represented by a byte array.
ADSTYPE_UNKNOWN
The data is of an undefined type.
ADSTYPE_DN_WITH_BINARY
The data is of ADS_DN_WITH_BINARY used for mapping a distinguished name to a non varying GUID.
ADSTYPE_DN_WITH_STRING
The data is of ADS_DN_WITH_STRING used for mapping a distinguished name to a non varying string value.

Remarks

Note  Because VBScript cannot read information from a type library, VBScript applications do not understand the symbolic constants as defined above. You should use the numerical constants instead to set the appropriate flags in your VBScript applications. 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.

Example Code [C++]

The following C code snippet illustrates certain usage of the member values of the ADSTYPEENUM enumeration.

ADS_SEARCHPREF_INFO prefInfo;
BOOL SearchScopeDefined;
 
prefInfo.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
if (SearchScopeDefined) {
    prefInfo.vValue.dwType = ADSTYPE_INTEGER;
    prefInfo.vValue.Integer = ADS_SCOPE_SUBTREE;
}
else 
    prefInfo.vValue.dwType = ADSTYPE_BOOLEAN;
    prefInfo.vValue.Boolean = FALSE;
}

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