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.
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
