ADSI Object Model

ADSI objects 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 only one set of logical functions at a time. In ADSI, the fundamental interfaces are:

IADs — Object Identification
Fundamental interface required on all ADSI objects. Supplies access to properties that describe the object itself (its metadata) including its definition in the ADSI Schema and access to properties and methods that manage the object's data in the property cache.
IADsContainer — Object Lifetime Management and Detection
Fundamental interface required on all ADSI container objects. Manages object creation, deletion, copying and moving, binding and enumeration.
IADsPropertyList — Object Property Management
Fundamental interface that optimizes managing an object's data in the property cache.
IDirectoryObject — Direct Object Access
Low-level object access for non-Automation clients. This interface bypasses the object property cache and provides a direct access to object properties. For more information, see IADs vs. IDirectoryObject Global Strategy.
IUnknown — COM Object Management
Required on all COM objects.
IDispatch — Type Library Information and Method Invocation.
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. ADSI objects that represent users support IADsUser, those that represent computers support IADsComputer, and so on. The list of ADSI objects defined for the SDK is in ADSI Object Definitions. Expanded explanations of ADSI objects can be found in IADs vs. IDirectoryObject Global Strategy. 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 in the Microsoft® Platform SDK.