Partager via


System.DirectoryServices API Element Differences

The following table lists the differences in the System.DirectoryServices programming elements when you use them to program for ADAM. For more information about the programming element, click the element name.

Programming element Difference
[ADS_OPTION_ENUM](/windows/win32/api/iads/ne-iads-ads_option_enum) enumeration
Two values, [ADS_OPTION_PASSWORD_PORTNUMBER](/windows/win32/api/iads/ne-iads-ads_option_enum) and ADS_OPTION_PASSWORD_METHOD, added to facilitate the setting of passwords.
[!Note]
To use these elements, you must use the [DirectoryEntry.Invoke](Http://go.microsoft.com/fwlink/p/?linkid=83866) method. For more information, see [Invoking ADSI](https://go.microsoft.com/fwlink/p/?linkid=94273).

[ADS_PASSWORD_ENCODING_ENUM](/windows/win32/api/iads/ne-iads-ads_password_encoding_enum) enumeration
Enumeration added to facilitate the setting of passwords.
[!Note]
To use this element, you must use the [DirectoryEntry.Invoke](Http://go.microsoft.com/fwlink/p/?linkid=83866) method. For more information, see [Invoking ADSI](https://go.microsoft.com/fwlink/p/?linkid=94273).

[DirectoryEntry](Http://go.microsoft.com/fwlink/p/?linkid=83868) class
[Path](Http://go.microsoft.com/fwlink/p/?linkid=83867) property includes a port number to specify an ADAM instance. For more information, see [LDAP ADsPath](/windows/win32/adsi/ldap-adspath).
[IADsUser::ChangePassword](/windows/win32/api/iads/nf-iads-iadsuser-changepassword) and [IADsUser::SetPassword](/windows/win32/api/iads/nf-iads-iadsuser-setpassword) methods
Before using these methods, you must use the [IADsObjectOptions::SetOption](/windows/win32/api/iads/nf-iads-iadsobjectoptions-setoption) method to set port number ([ADS_OPTION_PASSWORD_PORTNUMBER](/windows/win32/api/iads/ne-iads-ads_option_enum)) and method (ADS_OPTION_PASSWORD_METHOD).
[!Note]
To use these elements, you must use the [DirectoryEntry.Invoke](Http://go.microsoft.com/fwlink/p/?linkid=83866) method. For more information, see [Invoking ADSI](https://go.microsoft.com/fwlink/p/?linkid=94273).

[IADsAccessControlEntry::get_Trustee](/windows/win32/adsi/iadsaccesscontrolentry-property-methods) and IADsAccessControlEntry::put_Trustee methods
ADAM security principal names use a string security identifier (SID) rather than a friendly name.
[!Note]
System.DirectoryServices does not support the [IADsAccessControlEntry](/windows/win32/api/iads/nn-iads-iadsaccesscontrolentry) interface or the [IADsAccessControList](/windows/win32/api/iads/nn-iads-iadsaccesscontrollist) or [IADsSecurityDescriptor](/windows/win32/api/iads/nn-iads-iadssecuritydescriptor) interfaces.

Miscellaneous The WinNT, NDS, and NWCOMPAT providers do not apply for ADAM.