Platform SDK: Active Directory, ADSI, and Directory Services

Active Directory Service Interfaces Objects

The ADSI object model consists of COM objects. Clients manipulate objects with interfaces. ADSI providers implement the objects and their interfaces.

ADSI objects are COM objects that represent any item within a directory service: computers, users, files, servers, printers, print queues, and more — elements that network administrators work with daily. ADSI defines different kinds of objects to represent different kinds of elements. Each object, as shown in the following figure, supports one or more COM interfaces that give you access to information about the object itself (called metadata) and information about what the object represents.

Because COM interfaces are logically connected sets of properties and methods, you can think of each interface as a handle to the object that allows you access to only one set of logical functions at a time. In ADSI, the fundamental interfaces are:

IADs — Object identification
As the fundamental interface required on all ADSI objects, IADs supplies access to properties that describe the object itself (its metadata), including its definition in the ADSI schema. IADs also provides access to the properties and methods that manage the object's data in the property cache.
IADsContainer — Object lifetime management and detection
All ADSI container objects require the IADsContainer interface to manage object creation, deletion, copying and moving, binding, and enumeration.
IADsPropertyList — Object property management
The IADsPropertyList interface optimizes management of an object's data in the property cache.
IDirectoryObject — Direct object access
The IDirectoryObject interface provides low-level object access for clients that do not use Automation. This interface bypasses the object property cache and provides direct access to object properties. For more information, see The IADs and IDirectoryObject Interfaces.
IUnknown — COM object management
The IUnknown interface is required on all COM objects.
IDispatch — Type library information and method invocation
The IDispatch interface is required on all Automation objects.

More complex ADSI objects may expose additional interfaces. For example, IADsCollection supports methods that manage collections of directory elements of the same data type. IADsGroup methods manage the special case collections of objects that support the IADsMembers interface. For providers that support it, the IDirectorySearch interface supports methods to query directory services. In addition, ADSI supplies interfaces that represent well-known logical and physical items. For example, ADSI objects that represent users support IADsUser, those that represent computers support IADsComputer, and so on. Expanded explanations of ADSI objects can be found in The IADs and IDirectoryObject Interfaces. Not all providers implement all interfaces or all methods and properties on all interfaces. For more information, see provider-specific documentation in the ADSI reference pages.