The IADs and IDirectoryObject Interfaces
ADSI clients manage and manipulate directory service objects by using one of two COM interfaces: IADs or IDirectoryObject. IADs is an IDispatch interface intended for use by late-bound clients such as those written in Microsoft Visual Basic, Java, and various scripting languages. IDirectoryObject is a vtable interface that provides direct access to objects by early bound clients such as those written in C and C++.
Each ADSI object must implement both IADs and IDirectoryObject. ADSI clients written in languages such as C or C++, which are able to directly access vtables, can use either interface, but not both in the same application. ADSI clients written in Visual Basic or Java are limited to using IADs.
The IADs interface enables late-bound clients to take advantage of the inherent housekeeping features of the ADSI object model. Among these features is the property cache, which enables clients to read and write properties without going over the wire for each call. In addition, client applications gain the use of powerful UI and ActiveX control libraries and a simpler style of programming. In return, late-bound clients must use the VARIANT data type, which precludes using the richer native data types provided by ADSI.
The IDirectoryObject interface enables early bound clients to take full advantage of native directory-service data types at the cost of foregoing a slight performance advantage from using the property cache. In return, the IDirectoryObject interface provides direct, on-the-wire access to object properties through a single request, rather than through individual get and put calls.