Active Directory error codes are returned in the standard COM HRESULT status variable. The 32-bit error codes defined by Active Directory are listed below.
//
// MessageId: E_ADS_BAD_PATHNAME
//
// MessageText:
//
// An invalid Active Directory pathname was passed
//
#define E_ADS_BAD_PATHNAME _HRESULT_TYPEDEF_(0x80005000L)
//
// MessageId: E_ADS_INVALID_DOMAIN_OBJECT
//
// MessageText:
//
// An unknown Active Directory domain object was requested
//
#define E_ADS_INVALID_DOMAIN_OBJECT _HRESULT_TYPEDEF_(0x80005001L)
//
// MessageId: E_ADS_INVALID_USER_OBJECT
//
// MessageText:
//
// An unknown Active Directory user object was requested
//
#define E_ADS_INVALID_USER_OBJECT _HRESULT_TYPEDEF_(0x80005002L)
//
// MessageId: E_ADS_INVALID_COMPUTER_OBJECT
//
// MessageText:
//
// An unknown Active Directory computer object was requested
//
#define E_ADS_INVALID_COMPUTER_OBJECT _HRESULT_TYPEDEF_(0x80005003L)
//
// MessageId: E_ADS_UNKNOWN_OBJECT
//
// MessageText:
//
// An unknown Active Directory object was requested
//
#define E_ADS_UNKNOWN_OBJECT _HRESULT_TYPEDEF_(0x80005004L)
//
// MessageId: E_ADS_PROPERTY_NOT_SET
//
// MessageText:
//
// The specified Active Directory property was not set
//
#define E_ADS_PROPERTY_NOT_SET _HRESULT_TYPEDEF_(0x80005005L)
//
// MessageId: E_ADS_PROPERTY_NOT_SUPPORTED
//
// MessageText:
//
// The specified Active Directory property is not supported
//
#define E_ADS_PROPERTY_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80005006L)
//
// MessageId: E_ADS_PROPERTY_INVALID
//
// MessageText:
//
// The specified Active Directory property is invalid
//
#define E_ADS_PROPERTY_INVALID _HRESULT_TYPEDEF_(0x80005007L)
//
// MessageId: E_ADS_BAD_PARAMETER
//
// MessageText:
//
// One or more input parameters are invalid
//
#define E_ADS_BAD_PARAMETER _HRESULT_TYPEDEF_(0x80005008L)
//
// MessageId: E_ADS_OBJECT_UNBOUND
//
// MessageText:
//
// The specified Active Directory object is not bound to a remote resource
//
#define E_ADS_OBJECT_UNBOUND _HRESULT_TYPEDEF_(0x80005009L)
//
// MessageId: E_ADS_PROPERTY_NOT_MODIFIED
//
// MessageText:
//
// The specified Active Directory object has not been modified
//
#define E_ADS_PROPERTY_NOT_MODIFIED _HRESULT_TYPEDEF_(0x8000500AL)
//
// MessageId: E_ADS_PROPERTY_MODIFIED
//
// MessageText:
//
// The specified Active Directory object has not been modified
//
#define E_ADS_PROPERTY_MODIFIED _HRESULT_TYPEDEF_(0x8000500BL)
//
// MessageId: E_ADS_NETWARE_SPECIFIC_ERROR
//
// MessageText:
//
// A NetWare specific NWCCODE error is returned.
//
#define E_ADS_NETWARE_SPECIFIC_ERROR _HRESULT_TYPEDEF_(0x8000500BL)