Platform SDK: Active Directory, ADSI, and Directory Services

Getting Properties with the IDirectoryObject Interface

The IDirectoryObject interface provides clients written in C and C++ with direct access to directory service objects. The interface uses a direct on-the-wire protocol to provide access, rather than using the ADSI property cache. In place of the properties supported by the IADs interface, IDirectoryObject provides methods that support a critical subset of an object's housekeeping methods and provides access to its attributes. With IDirectoryObject, a client can get or set any number of object attributes with one method call. Unlike the corresponding Automation methods, which are batched, those of IDirectoryObject are executed as soon as they are called. Since methods on this interface do not require creating an instance of an Automation directory object, the performance overhead is very low.

Clients written in languages such as C and C++ should call the methods of IDirectoryObject to optimize performance and take full advantage of native directory service interfaces. Automation clients cannot use IDirectoryObject. Instead, they should call the IADs interface.