Win32 Error Codes for ADSI 2.0

The following table lists the LDAP error messages for ADSI 2.0.

ADSI Error Value LDAP message Win32 message Description
0 LDAP_SUCCESS NO_ERROR Operation succeeded.
0x80070002 LDAP_NO_SUCH_OBJECT ERROR_FILE_NOT_FOUND Object does not exist.
0x80070005 LDAP_AUTH_METHOD_NOT_SUPPORTED ERROR_ACCESS_DENIED Authentication method not supported.
0x80070005 LDAP_STRONG_AUTH_REQUIRED ERROR_ACCESS_DENIED Requires strong authentication.
0x80070005 LDAP_INAPPROPRIATE_AUTH ERROR_ACCESS_DENIED Inappropriate authentication.
0x80070005 LDAP_INSUFFICIENT_RIGHTS ERROR_ACCESS_DENIED User has insufficient access rights.
0x80070005 LDAP_AUTH_UNKNOWN ERROR_ACCESS_DENIED Unknown authentication error occurred.
0x80070008 LDAP_NO_MEMORY ERROR_NOT_ENOUGH_MEMORY System is out of memory.
0x8007001F LDAP_OTHER ERROR_GEN_FAILURE Unknown error occurred.
0x8007001F LDAP_LOCAL_ERROR ERROR_GEN_FAILURE Local error occurred.
0x80070037 LDAP_UNAVAILABLE ERROR_DEV_NOT_EXIST Server is not available.
0x8007003A LDAP_SERVER_DOWN ERROR_BAD_NET_RESP Cannot contact the LDAP server.
0x8007003B LDAP_ENCODING_ERROR ERROR_UNEXP_NET_ERR Encoding error occurred.
0x8007003B LDAP_DECODING_ERROR ERROR_UNEXP_NET_ERR Decoding error occurred.
0x80070044 LDAP_ADMIN_LIMIT_EXCEEDED ERROR_TOO_MANY_NAMES Exceeded administration limit on the server.
0x80070056 LDAP_INVALID_CREDENTIALS ERROR_INVALID_PASSWORD Credential not valid.
0x80070057 LDAP_INVALID_DN_SYNTAX ERROR_INVALID_PARAMETER Distinguished name has syntax that is not valid.
0x80070057 LDAP_NAMING_VIOLATION ERROR_INVALID_PARAMETER Naming violation.
0x80070057 LDAP_OBJECT_CLASS_VIOLATION ERROR_INVALID_PARAMETER Object class violation.
0x80070057 LDAP_FILTER_ERROR ERROR_INVALID_PARAMETER Search filter is bad.
0x80070057 LDAP_PARAM_ERROR ERROR_INVALID_PARAMETER Bad parameter was passed to a routine.
0X8007006E LDAP_OPERATIONS_ERROR ERROR_OPEN_FAILED Operation error occurred.
0x8007007A LDAP_RESULTS_TOO_LARGE ERROR_INSUFFICIENT_BUFFER Results set is too large.
0x8007007B LDAP_INVALID_SYNTAX ERROR_INVALID_NAME Syntax not valid.
0x8007007C LDAP_PROTOCOL_ERROR ERROR_INVALID_LEVEL Protocol error.
0x800700B7 LDAP_ALREADY_EXISTS ERROR_ALREADY_EXISTS Object already exists.
0x800700EA LDAP_PARTIAL_RESULTS ERROR_MORE_DATA Partial results and referrals received.
0x800700EA LDAP_BUSY ERROR_BUSY Server is busy.
0x800703EB LDAP_UNWILLING_TO_PERFORM ERROR_CAN_NOT_COMPLETE Server cannot perform operation.
0x8007041D LDAP_TIMEOUT ERROR_SERVICE_REQUEST_TIMEOUT Search timed out.
0x800704B8 LDAP_COMPARE_FALSE ERROR_EXTENDED_ERROR Compare yielded FALSE.
0x800704B8 LDAP_COMPARE_TRUE ERROR_EXTENDED_ERROR Compare yielded TRUE.
0x800704B8 LDAP_REFERRAL ERROR_EXTENDED_ERROR Cannot resolve referral.
0x800704B8 LDAP_UNAVAILABLE_CRIT_EXTENSION ERROR_EXTENDED_ERROR Critical extension is unavailable.
0x800704B8 LDAP_NO_SUCH_ATTRIBUTE ERROR_EXTENDED_ERROR Requested attribute does not exist.
0x800704B8 LDAP_UNDEFINED_TYPE ERROR_EXTENDED_ERROR Type is not defined.
0x800704B8 LDAP_INAPPROPRIATE_MATCHING ERROR_EXTENDED_ERROR There was an inappropriate matching.
0x800704B8 LDAP_CONSTRAINT_VIOLATION ERROR_EXTENDED_ERROR There was a constrain violation.
0x800704B8 LDAP_ATTRIBUTE_OR_VALUE_EXISTS ERROR_EXTENDED_ERROR The attribute exists or the value has been assigned.
0x800704B8 LDAP_ALIAS_PROBLEM ERROR_EXTENDED_ERROR Alias is not valid.
0x800704B8 LDAP_IS_LEAF ERROR_EXTENDED_ERROR Object is a leaf.
0x800704B8 LDAP_ALIAS_DEREF_PROBLEM ERROR_EXTENDED_ERROR Cannot dereference the alias.
0x800704B8 LDAP_LOOP_DETECT ERROR_EXTENDED_ERROR Loop was detected.
0x800704B8 LDAP_NOT_ALLOWED_ON_NONLEAF ERROR_EXTENDED_ERROR Operation is not allowed on a non-leaf object.
0x800704B8 LDAP_NOT_ALLOWED_ON_RDN ERROR_EXTENDED_ERROR Operation is not allowed on RDN.
0x800704B8 LDAP_NO_OBJECT_CLASS_MODS ERROR_EXTENDED_ERROR Cannot modify object class.
0x800704B8 LDAP_AFFECTS_MULTIPLE_DSAS ERROR_EXTENDED_ERROR Multiple directory service agents are affected.
0x800704C7 LDAP_USER_CANCELLED ERROR_CANCELLED User has canceled the operation.
0x80070718 LDAP_TIMELIMIT_EXCEEDED ERROR_NOT_ENOUGH_QUOTA Exceeded time limit.
0x80070718 LDAP_SIZELIMIT_EXCEEDED ERROR_NOT_ENOUGH_QUOTA Exceeded size limit.

 

In ADSI 2.0, several LDAP error messages are mapped to a Win32 error code as ERROR_EXTENDED_ERROR. Call ADsGetLastError to retrieve the error string returned by the server. For more information, see ADSI Extended Error Messages below.