#ADS_ACEFLAG_ENUM
  ADS_ACEFLAG_INHERIT_ACE               = 0x2,
  ADS_ACEFLAG_NO_PROPAGATE_INHERIT_ACE  = 0x4,
  ADS_ACEFLAG_INHERIT_ONLY_ACE          = 0x8,
  ADS_ACEFLAG_INHERITED_ACE             = 0x10,
  ADS_ACEFLAG_VALID_INHERIT_FLAGS       = 0x1f,
  ADS_ACEFLAG_SUCCESSFUL_ACCESS         = 0x40,
  ADS_ACEFLAG_FAILED_ACCESS             = 0x80
#ADS_ACETYPE_ENUM
  ADS_ACETYPE_ACCESS_ALLOWED                  = 0,
  ADS_ACETYPE_ACCESS_DENIED                   = 0x1,
  ADS_ACETYPE_SYSTEM_AUDIT                    = 0x2,
  ADS_ACETYPE_ACCESS_ALLOWED_OBJECT           = 0x5,
  ADS_ACETYPE_ACCESS_DENIED_OBJECT            = 0x6,
  ADS_ACETYPE_SYSTEM_AUDIT_OBJECT             = 0x7,
  ADS_ACETYPE_SYSTEM_ALARM_OBJECT             = 0x8,
  ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK         = 0x9,
  ADS_ACETYPE_ACCESS_DENIED_CALLBACK          = 0xA,
  ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK_OBJECT  = 0xB,
  ADS_ACETYPE_ACCESS_DENIED_CALLBACK_OBJECT   = 0xC,
  ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK           = 0xD,
  ADS_ACETYPE_SYSTEM_ALARM_CALLBACK           = 0xE,
  ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK_OBJECT    = 0xF,
  ADS_ACETYPE_SYSTEM_ALARM_CALLBACK_OBJECT    = 0x10
#ADS_AUTHENTICATION_ENUM
  ADS_SECURE_AUTHENTICATION  = 0x1,
  ADS_USE_ENCRYPTION         = 0x2,
  ADS_USE_SSL                = 0x2,
  ADS_READONLY_SERVER        = 0x4,
  ADS_PROMPT_CREDENTIALS     = 0x8,
  ADS_NO_AUTHENTICATION      = 0x10,
  ADS_FAST_BIND              = 0x20,
  ADS_USE_SIGNING            = 0x40,
  ADS_USE_SEALING            = 0x80,
  ADS_USE_DELEGATION         = 0x100,
  ADS_SERVER_BIND            = 0x200,
  ADS_NO_REFERRAL_CHASING    = 0x400,
  ADS_AUTH_RESERVED          = 0x80000000
#ADS_CHASE_REFERRALS_ENUM
  ADS_CHASE_REFERRALS_NEVER        = 0x00,
  ADS_CHASE_REFERRALS_SUBORDINATE  = 0x20,
  ADS_CHASE_REFERRALS_EXTERNAL     = 0x40,
  ADS_CHASE_REFERRALS_ALWAYS       = 0x20 | 0x40
#ADS_DEREFENUM
  ADS_DEREF_NEVER      = 0,
  ADS_DEREF_SEARCHING  = 1,
  ADS_DEREF_FINDING    = 2,
  ADS_DEREF_ALWAYS     = 3
#ADS_DISPLAY_ENUM
  ADS_DISPLAY_FULL        = 1,
  ADS_DISPLAY_VALUE_ONLY  = 2
#ADS_ESCAPE_MODE_ENUM
  ADS_ESCAPEDMODE_DEFAULT  = 1,
  ADS_ESCAPEDMODE_ON       = 2,
  ADS_ESCAPEDMODE_OFF      = 3,
  ADS_ESCAPEDMODE_OFF_EX   = 4
#ADS_FLAGTYPE_ENUM
  ADS_FLAG_OBJECT_TYPE_PRESENT            = 0x1,
  ADS_FLAG_INHERITED_OBJECT_TYPE_PRESENT  = 0x2
#ADS_FORMAT_ENUM
  ADS_FORMAT_WINDOWS            = 1,
  ADS_FORMAT_WINDOWS_NO_SERVER  = 2,
  ADS_FORMAT_WINDOWS_DN         = 3,
  ADS_FORMAT_WINDOWS_PARENT     = 4,
  ADS_FORMAT_X500               = 5,
  ADS_FORMAT_X500_NO_SERVER     = 6,
  ADS_FORMAT_X500_DN            = 7,
  ADS_FORMAT_X500_PARENT        = 8,
  ADS_FORMAT_SERVER             = 9,
  ADS_FORMAT_PROVIDER           = 10,
  ADS_FORMAT_LEAF               = 11
#ADS_GROUP_TYPE_ENUM
  ADS_GROUP_TYPE_GLOBAL_GROUP        = 0x00000002,
  ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP  = 0x00000004,
  ADS_GROUP_TYPE_LOCAL_GROUP         = 0x00000004,
  ADS_GROUP_TYPE_UNIVERSAL_GROUP     = 0x00000008,
  ADS_GROUP_TYPE_SECURITY_ENABLED    = 0x80000000
#ADS_NAME_INITTYPE_ENUM
  ADS_NAME_INITTYPE_DOMAIN  = 1,
  ADS_NAME_INITTYPE_SERVER  = 2,
  ADS_NAME_INITTYPE_GC      = 3
#ADS_NAME_TYPE_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_OPTION_ENUM
  ADS_OPTION_SERVERNAME                 = 0,
  ADS_OPTION_REFERRALS                  = 1,
  ADS_OPTION_PAGE_SIZE                  = 2,
  ADS_OPTION_SECURITY_MASK              = 3,
  ADS_OPTION_MUTUAL_AUTH_STATUS         = 4,
  ADS_OPTION_QUOTA                      = 5,
  ADS_OPTION_PASSWORD_PORTNUMBER        = 6,
  ADS_OPTION_PASSWORD_METHOD            = 7,
  ADS_OPTION_ACCUMULATIVE_MODIFICATION  = 8,
  ADS_OPTION_SKIP_SID_LOOKUP            = 9
#ADS_PASSWORD_ENCODING_ENUM
  ADS_PASSWORD_ENCODE_REQUIRE_SSL  = 0,
  ADS_PASSWORD_ENCODE_CLEAR        = 1
#ADS_PATHTYPE_ENUM
  ADS_PATH_FILE       = 1,
  ADS_PATH_FILESHARE  = 2,
  ADS_PATH_REGISTRY   = 3
#ADS_PREFERENCES_ENUM
  ADSIPROP_ASYNCHRONOUS      = 0,
  ADSIPROP_DEREF_ALIASES     = 0x1,
  ADSIPROP_SIZE_LIMIT        = 0x2,
  ADSIPROP_TIME_LIMIT        = 0x3,
  ADSIPROP_ATTRIBTYPES_ONLY  = 0x4,
  ADSIPROP_SEARCH_SCOPE      = 0x5,
  ADSIPROP_TIMEOUT           = 0x6,
  ADSIPROP_PAGESIZE          = 0x7,
  ADSIPROP_PAGED_TIME_LIMIT  = 0x8,
  ADSIPROP_CHASE_REFERRALS   = 0x9,
  ADSIPROP_SORT_ON           = 0xa,
  ADSIPROP_CACHE_RESULTS     = 0xb,
  ADSIPROP_ADSIFLAG          = 0xc
#ADS_PROPERTY_OPERATION_ENUM
  ADS_PROPERTY_CLEAR   = 1,
  ADS_PROPERTY_UPDATE  = 2,
  ADS_PROPERTY_APPEND  = 3,
  ADS_PROPERTY_DELETE  = 4
#ADS_RIGHTS_ENUM
  ADS_RIGHT_DELETE                  = 0x10000,
  ADS_RIGHT_READ_CONTROL            = 0x20000,
  ADS_RIGHT_WRITE_DAC               = 0x40000,
  ADS_RIGHT_WRITE_OWNER             = 0x80000,
  ADS_RIGHT_SYNCHRONIZE             = 0x100000,
  ADS_RIGHT_ACCESS_SYSTEM_SECURITY  = 0x1000000,
  ADS_RIGHT_GENERIC_READ            = 0x80000000,
  ADS_RIGHT_GENERIC_WRITE           = 0x40000000,
  ADS_RIGHT_GENERIC_EXECUTE         = 0x20000000,
  ADS_RIGHT_GENERIC_ALL             = 0x10000000,
  ADS_RIGHT_DS_CREATE_CHILD         = 0x1,
  ADS_RIGHT_DS_DELETE_CHILD         = 0x2,
  ADS_RIGHT_ACTRL_DS_LIST           = 0x4,
  ADS_RIGHT_DS_SELF                 = 0x8,
  ADS_RIGHT_DS_READ_PROP            = 0x10,
  ADS_RIGHT_DS_WRITE_PROP           = 0x20,
  ADS_RIGHT_DS_DELETE_TREE          = 0x40,
  ADS_RIGHT_DS_LIST_OBJECT          = 0x80,
  ADS_RIGHT_DS_CONTROL_ACCESS       = 0x100
#ADS_SCOPEENUM
  ADS_SCOPE_BASE      = 0,
  ADS_SCOPE_ONELEVEL  = 1,
  ADS_SCOPE_SUBTREE   = 2
#ADS_SD_CONTROL_ENUM
  ADS_SD_CONTROL_SE_OWNER_DEFAULTED        = 0x0001,
  ADS_SD_CONTROL_SE_GROUP_DEFAULTED        = 0x0002,
  ADS_SD_CONTROL_SE_DACL_PRESENT           = 0x0004,
  ADS_SD_CONTROL_SE_DACL_DEFAULTED         = 0x0008,
  ADS_SD_CONTROL_SE_SACL_PRESENT           = 0x0010,
  ADS_SD_CONTROL_SE_SACL_DEFAULTED         = 0x0020,
  ADS_SD_CONTROL_SE_DACL_AUTO_INHERIT_REQ  = 0x0100,
  ADS_SD_CONTROL_SE_SACL_AUTO_INHERIT_REQ  = 0x0200,
  ADS_SD_CONTROL_SE_DACL_AUTO_INHERITED    = 0x0400,
  ADS_SD_CONTROL_SE_SACL_AUTO_INHERITED    = 0x0800,
  ADS_SD_CONTROL_SE_DACL_PROTECTED         = 0x1000,
  ADS_SD_CONTROL_SE_SACL_PROTECTED         = 0x2000,
  ADS_SD_CONTROL_SE_SELF_RELATIVE          = 0x8000
#ADS_SD_FORMAT_ENUM
  ADS_SD_FORMAT_IID        = 1,
  ADS_SD_FORMAT_RAW        = 2,
  ADS_SD_FORMAT_HEXSTRING  = 3
#ADS_SD_REVISION_ENUM
  ADS_SD_REVISION_DS  = 4
#ADS_SEARCHPREF_ENUM
  ADS_SEARCHPREF_ASYNCHRONOUS      = 0,
  ADS_SEARCHPREF_DEREF_ALIASES     = 1,
  ADS_SEARCHPREF_SIZE_LIMIT        = 2,
  ADS_SEARCHPREF_TIME_LIMIT        = 3,
  ADS_SEARCHPREF_ATTRIBTYPES_ONLY  = 4,
  ADS_SEARCHPREF_SEARCH_SCOPE      = 5,
  ADS_SEARCHPREF_TIMEOUT           = 6,
  ADS_SEARCHPREF_PAGESIZE          = 7,
  ADS_SEARCHPREF_PAGED_TIME_LIMIT  = 8,
  ADS_SEARCHPREF_CHASE_REFERRALS   = 9,
  ADS_SEARCHPREF_SORT_ON           = 10,
  ADS_SEARCHPREF_CACHE_RESULTS     = 11,
  ADS_SEARCHPREF_DIRSYNC           = 12,
  ADS_SEARCHPREF_TOMBSTONE         = 13,
  ADS_SEARCHPREF_VLV               = 14,
  ADS_SEARCHPREF_ATTRIBUTE_QUERY   = 15,
  ADS_SEARCHPREF_SECURITY_MASK     = 16,
  ADS_SEARCHPREF_DIRSYNC_FLAG      = 17,
  ADS_SEARCHPREF_EXTENDED_DN       = 18
#ADS_SECURITY_INFO_ENUM
  ADS_SECURITY_INFO_OWNER  = 0x1,
  ADS_SECURITY_INFO_GROUP  = 0x2,
  ADS_SECURITY_INFO_DACL   = 0x4,
  ADS_SECURITY_INFO_SACL   = 0x8
#ADS_SETTYPE_ENUM
  ADS_SETTYPE_FULL      = 1,
  ADS_SETTYPE_PROVIDER  = 2,
  ADS_SETTYPE_SERVER    = 3,
  ADS_SETTYPE_DN        = 4
#ADS_STATUSENUM
  ADS_STATUS_S_OK                     = 0,
  ADS_STATUS_INVALID_SEARCHPREF       = 1,
  ADS_STATUS_INVALID_SEARCHPREFVALUE  = 2
#ADS_SYSTEMFLAG_ENUM
  ADS_SYSTEMFLAG_DISALLOW_DELETE            = 0x80000000,
  ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME        = 0x40000000,
  ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE          = 0x20000000,
  ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE  = 0x10000000,
  ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME     = 0x08000000,
  ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE       = 0x04000000,
  ADS_SYSTEMFLAG_CR_NTDS_NC                 = 0x1,
  ADS_SYSTEMFLAG_CR_NTDS_DOMAIN             = 0x2,
  ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED        = 0x1,
  ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED        = 0x4
#ADS_USER_FLAG_ENUM
  ADS_UF_SCRIPT                                  = 0x1
  ADS_UF_ACCOUNTDISABLE                          = 0x2
  ADS_UF_HOMEDIR_REQUIRED                        = 0x8
  ADS_UF_LOCKOUT                                 = 0x10
  ADS_UF_PASSWD_NOTREQD                          = 0x20
  ADS_UF_PASSWD_CANT_CHANGE                      = 0x40
  ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED         = 0x80
  ADS_UF_TEMP_DUPLICATE_ACCOUNT                  = 0x100
  ADS_UF_NORMAL_ACCOUNT                          = 0x200
  ADS_UF_INTERDOMAIN_TRUST_ACCOUNT               = 0x800
  ADS_UF_WORKSTATION_TRUST_ACCOUNT               = 0x1000
  ADS_UF_SERVER_TRUST_ACCOUNT                    = 0x2000
  ADS_UF_DONT_EXPIRE_PASSWD                      = 0x10000
  ADS_UF_MNS_LOGON_ACCOUNT                       = 0x20000
  ADS_UF_SMARTCARD_REQUIRED                      = 0x40000
  ADS_UF_TRUSTED_FOR_DELEGATION                  = 0x80000
  ADS_UF_NOT_DELEGATED                           = 0x100000
  ADS_UF_USE_DES_KEY_ONLY                        = 0x200000
  ADS_UF_DONT_REQUIRE_PREAUTH                    = 0x400000
  ADS_UF_PASSWORD_EXPIRED                        = 0x800000
  ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION  = 0x1000000
#ADSI_DIALECT_ENUM
  ADSI_DIALECT_LDAP  = 0,
  ADSI_DIALECT_SQL   = 0x1
#ADSTYPEENUM
  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
