ADSI for Clients

Active Directory Service Interfaces are COM interfaces that isolate client applications from underlying network specific API calls to a directory service. Client applications that use these interfaces or the COM Automation objects that expose IADs and the other Active Directory Service interfaces benefit from the layered insulation of the underlying directory services.

You can write ADSI client applications in many languages, For the majority of administrative tasks, ADSI defines interfaces and objects accessible from Automation-compliant languages like Microsoft® Visual Basic®, Microsoft® Visual Basic® Scripting Edition (VBScript), and Java to the more performance and efficiency-conscious languages such as C and C++.

Smooth integration with Active Server Pages and VBScript make it easy to write Internet applications that access directory services. For integration with OLE DB applications, ADSI supplies an OLE DB provider by supporting a subset of the OLE DB query interfaces. For Internet applications, using scripting in .asp files (Active Server Pages) can create and manipulate ADSI objects on the server and display the results in a Web page. In Microsoft® Management Console, directory-service administration snap-ins can use ADSI to find directory services of interest. In short, Active Directory Service Interfaces can provide access to a broad and diverse set of directory services — including those not yet built.

For tasks that require high performance and low overhead, the ADSI architecture defines low-level, non-Automation interfaces accessible from languages like C and C++ that are little more than COM wrappers for on-the-wire protocols to a directory service.

Coding to the published interfaces allows your application to reach directory services for all installed ADSI providers and integrate the resulting information. Without recompiling or amending your code, your application can continue to access additional directory services on your network as new ADSI providers are installed.

The following figure shows how ADSI fits into an application environment. Whether the application is written in Java, Visual Basic, C/C++, VBScript, Microsoft® JScript™, or as a web application using Active Server Pages, Active Directory Service Interfaces provide a clean and easy-to-use access to the underlying directory services without having to use the native network APIs.

As shown in the preceding figure, non-Automation clients have access to all ADSI interfaces, including both pure COM interfaces with the naming convention IDirectoryXXX and Automation COM interfaces with the naming convention IADsXXX. Because clients predominantly request information from directory services, ADSI's flexible query model through OLE DB and IDirectorySearch is especially powerful.