ADSI Error Codes
All ADSI error codes are returned as COM HRESULT values. They can be grouped into the following four types:
- Generic COM error codes
- Generic ADSI error codes
- Win32 error codes for ADSI
- LDAP error codes for ADSI
In addition, certain interfaces provide additional error information, known as ADSI extended error messages, which can be obtained using the ADsGetLastError function.
Finally, the C++ example code shown in this section shows how to work ADSI error messages.