Compartir a través de


2.4 LDAP Error to Win32 Error Mapping

Windows contains an implementation of the LDAP resultCode ([RFC2251] section 4.1.10) which is used by higher-layer protocols to interpret the results of an LDAP operation.

Each LDAP error value is also mapped to the closest Win32 error value, for use by the higher-layer protocols. This mapping is as shown in the following table:

Value: Decimal

Value: Hexadecimal representation

LDAPResult.resultCode: RFC 1777

LDAPResult.resultCode: RFC 2251

Windows: Ldap Error (LDAP_RETCODE from winldap.w)

Windows: Win32 error (from LdapMapErrorToWin32 / winmain\ds\ds\src\ldap\client\util.cxx)

0

0x0

success

success

LDAP_SUCCESS

NO_ERROR

1

0x1

operationsError

operationsError

LDAP_OPERATIONS_ERROR

ERROR_OPEN_FAILED

2

0x2

protocolError

protocolError

LDAP_PROTOCOL_ERROR

ERROR_INVALID_LEVEL

3

0x3

timeLimitExceeded

timeLimitExceeded

LDAP_TIMELIMIT_EXCEEDED

ERROR_TIMEOUT

4

0x4

sizeLimitExceeded

sizeLimitExceeded

LDAP_SIZELIMIT_EXCEEDED

ERROR_MORE_DATA

5

0x5

compareFalse

compareFalse

LDAP_COMPARE_FALSE

ERROR_DS_GENERIC_ERROR

6

0x6

compareTrue

compareTrue

LDAP_COMPARE_TRUE

ERROR_DS_GENERIC_ERROR

7

0x7

authMethodNotSupported

authMethodNotSupported

LDAP_AUTH_METHOD_NOT_SUPPORTED

ERROR_ACCESS_DENIED

8

0x8

strongAuthRequired

strongAuthRequired

LDAP_STRONG_AUTH_REQUIRED

ERROR_ACCESS_DENIED

9

0x9

9 reserved

LDAP_REFERRAL_V2, LDAP_PARTIAL_RESULTS

ERROR_MORE_DATA

10

0xA

referral

LDAP_REFERRAL

11

0xB

adminLimitExceeded

LDAP_ADMIN_LIMIT_EXCEEDED

ERROR_NOT_ENOUGH_QUOTA

12

0xC

unavailableCriticalExtension

LDAP_UNAVAILABLE_CRIT_EXTENSION

ERROR_CAN_NOT_COMPLETE

13

0xD

confidentialityRequired

LDAP_CONFIDENTIALITY_REQUIRED

14

0xE

saslBindInProgress

LDAP_SASL_BIND_IN_PROGRESS

15

0xF

16

0x10

noSuchAttribute

noSuchAttribute

LDAP_NO_SUCH_ATTRIBUTE

ERROR_INVALID_PARAMETER

17

0x11

undefinedAttributeType

undefinedAttributeType

LDAP_UNDEFINED_TYPE

ERROR_DS_GENERIC_ERROR

18

0x12

inappropriateMatching

inappropriateMatching

LDAP_INAPPROPRIATE_MATCHING

ERROR_INVALID_PARAMETER

19

0x13

constraintViolation

constraintViolation

LDAP_CONSTRAINT_VIOLATION

ERROR_INVALID_PARAMETER

20

0x14

attributeOrValueExists

attributeOrValueExists

LDAP_ATTRIBUTE_OR_VALUE_EXISTS

ERROR_ALREADY_EXISTS

21

0x15

invalidAttributeSyntax

invalidAttributeSyntax

LDAP_INVALID_SYNTAX

ERROR_INVALID_NAME

22

0x16

23

0x17

24

0x18

25

0x19

26

0x1A

27

0x1B

28

0x1C

29

0x1D

30

0x1E

31

0x1F

32

0x20

noSuchObject

noSuchObject

LDAP_NO_SUCH_OBJECT

ERROR_FILE_NOT_FOUND

33

0x21

aliasProblem

aliasProblem

LDAP_ALIAS_PROBLEM

ERROR_DS_GENERIC_ERROR

34

0x22

invalidDNSyntax

invalidDNSyntax

LDAP_INVALID_DN_SYNTAX

ERROR_INVALID_PARAMETER

35

0x23

isLeaf

35 reserved for undefined isLeaf

LDAP_IS_LEAF

ERROR_DS_GENERIC_ERROR

36

0x24

aliasDereferencingProblem

aliasDereferencingProblem

LDAP_ALIAS_DEREF_PROBLEM

ERROR_DS_GENERIC_ERROR

37

0x25

37-47 unused

38

0x26

39

0x27

40

0x28

41

0x29

42

0x2A

43

0x2B

44

0x2C

45

0x2D

46

0x2E

47

0x2F

48

0x30

inappropriateAuthentication

inappropriateAuthentication

LDAP_INAPPROPRIATE_AUTH

ERROR_ACCESS_DENIED

49

0x31

invalidCredentials

invalidCredentials

LDAP_INVALID_CREDENTIALS

ERROR_LOGON_FAILURE

50

0x32

insufficientAccessRights

insufficientAccessRights

LDAP_INSUFFICIENT_RIGHTS

ERROR_ACCESS_DENIED

51

0x33

busy

busy

LDAP_BUSY

ERROR_BUSY

52

0x34

unavailable

unavailable

LDAP_UNAVAILABLE

ERROR_DEV_NOT_EXIST

53

0x35

unwillingToPerform

unwillingToPerform

LDAP_UNWILLING_TO_PERFORM

ERROR_CAN_NOT_COMPLETE

54

0x36

loopDetect

loopDetect

LDAP_LOOP_DETECT

ERROR_DS_GENERIC_ERROR

55

0x37

55-63 unused

56

0x38

57

0x39

58

0x3A

59

0x3B

60

0x3C

LDAP_SORT_CONTROL_MISSING

ERROR_DS_SORT_CONTROL_MISSING

61

0x3D

LDAP_OFFSET_RANGE_ERROR

ERROR_DS_OFFSET_RANGE_ERROR

62

0x3E

63

0x3F

64

0x40

namingViolation

namingViolation

LDAP_NAMING_VIOLATION

ERROR_INVALID_PARAMETER

65

0x41

objectClassViolation

objectClassViolation

LDAP_OBJECT_CLASS_VIOLATION

ERROR_INVALID_PARAMETER

66

0x42

notAllowedOnNonLeaf

notAllowedOnNonLeaf

LDAP_NOT_ALLOWED_ON_NONLEAF

ERROR_CAN_NOT_COMPLETE

67

0x43

notAllowedOnRDN

notAllowedOnRDN

LDAP_NOT_ALLOWED_ON_RDN

ERROR_ACCESS_DENIED

68

0x44

entryAlreadyExists

entryAlreadyExists

LDAP_ALREADY_EXISTS

ERROR_ALREADY_EXISTS

69

0x45

objectClassModsProhibited

objectClassModsProhibited

LDAP_NO_OBJECT_CLASS_MODS

ERROR_ACCESS_DENIED

70

0x46

70 reserved for CLDAP

LDAP_RESULTS_TOO_LARGE

ERROR_INSUFFICIENT_BUFFER

71

0x47

affectsMultipleDSAs

LDAP_AFFECTS_MULTIPLE_DSAS

ERROR_CAN_NOT_COMPLETE

72

0x48

72-79 unused

73

0x49

74

0x4A

75

0x4B

76

0x4C

LDAP_VIRTUAL_LIST_VIEW_ERROR

77

0x4D

78

0x4E

79

0x4F

80

0x50

other

other

LDAP_OTHER

ERROR_DS_GENERIC_ERROR

81

0x51

81-90 reserved for APIs

LDAP_SERVER_DOWN

ERROR_BAD_NET_RESP

82

0x52

LDAP_LOCAL_ERROR

ERROR_DS_GENERIC_ERROR

83

0x53

LDAP_ENCODING_ERROR

ERROR_UNEXP_NET_ERR

84

0x54

LDAP_DECODING_ERROR

ERROR_UNEXP_NET_ERR

85

0x55

LDAP_TIMEOUT

ERROR_SERVICE_REQUEST_TIMEOUT

86

0x56

LDAP_AUTH_UNKNOWN

ERROR_WRONG_PASSWORD

87

0x57

LDAP_FILTER_ERROR

ERROR_INVALID_PARAMETER

88

0x58

LDAP_USER_CANCELLED

ERROR_CANCELLED

89

0x59

LDAP_PARAM_ERROR

ERROR_INVALID_PARAMETER

90

0x5A

LDAP_NO_MEMORY

ERROR_NOT_ENOUGH_MEMORY

91

0x5B

LDAP_CONNECT_ERROR

ERROR_CONNECTION_REFUSED

92

0x5C

LDAP_NOT_SUPPORTED

ERROR_CAN_NOT_COMPLETE

93

0x5D

LDAP_NO_RESULTS_RETURNED

ERROR_MORE_DATA

94

0x5E

LDAP_CONTROL_NOT_FOUND

ERROR_NOT_FOUND

95

0x5F

LDAP_MORE_RESULTS_TO_RETURN

ERROR_MORE_DATA

96

0x60

LDAP_CLIENT_LOOP

97

0x61

LDAP_REFERRAL_LIMIT_EXCEEDED

98

0x62