When an LDAP server generates an error and passes the error to
the client, the error is then translated into a string by the LDAP
client.
To Determine the
LDAP error codes for ADSI
This method is similar to Win32 error codes for ADSI. In
this example, the client error code is the WIN32 error
0x80072020.
Drop the 8007 from the WIN32 error code. In the example, the
remaining hex value is 2020.
Convert the remaining hex value to a decimal value. In the
example, the remaining hex value 2020 converts to the decimal value
8224.
Search in the Winerror.h file for the definition of the decimal
value. In the example, 8224L corresponds to the error
ERROR_DS_OPERATIONS_ERROR.
Replace the prefix ERROR_DS with LDAP_. In the example, the new
definition is LDAP_OPERATIONS_ERROR.
Search in the Winldap.h file for the value of the LDAP error
definition. In the example, the value of LDAP_OPERATIONS_ERROR in
the Winldap.h file is 0x01.