IADs

The IADs interface provides methods for getting and setting information about ADSI objects. COM objects supporting this interface form the building blocks of a directory service implementation. Active Directory objects may represent all elements in a directory service, including users, computers, services, how user accounts and computers are organized, and the hierarchical directory trees of all the file systems on the network.

Properties accessed by IADs are defined on the ADSI Object. The basic functionality supplied by this interface includes providing:

ADSI Objects can contain other objects. Container objects support the additional IADsContainer interface.

The flexibility and uniformity provided by using Active Directory objects to represent all aspects of a directory service allows both network administrators and Active Directory providers a simple, consistent view of various underlying directory services.

When to Implement

Implement IADs only when you are providing an Active Directory implementation for your directory service.

If you are adding functionality or properties to existing Active Directory objects, you must define and implement a custom COM interface to do so.

When to Use

All ADSI client applications or tools call these methods to communicate with directory service objects. For example, code written to expand a directory tree upward uses the get_Parent (Visual Basic, .Parent) method to determine if this object is contained by another level in the directory hierarchy. If you have an interface pointer to an instance of this object through an enumeration, you can retrieve its ADsPath name using Visual Basic (Visual Basic, .Name). If you are browsing through the directory service to see what methods and properties are supported, call get_Schema (Visual Basic, .Schema) to get the ADsPath name of the object that represents this schema class of object in the schema definition. Use the Get method with the property names retrieved from the schema object to get the values of all the properties currently defined on the object.

If you need to identify the ADSI User objects for every implementation, retrieve one user object by enumerating the schema object for the class name User, retrieve the GUID for the Active Directory object type User with get_GUID (Visual Basic, .GUID), set the enumeration filter for that GUID, and enumerate through all the providers' ADSI Namespace Objects to find the User objects for every implementation.

Consult the documentation for the specific providers in use to determine what ADSI errors are returned for their providers. This includes errors which indicate a request may not have been completely processed.

Methods in VTable Order

IUnknown Methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.

IDispatch Methods Description
GetTypeInfoCount Gets the number of type descriptions.
GetTypeInfo Gets a description of object's programmable interface.
GetIDsOfNames Maps name of method or property to DISPID.
Invoke Calls one of the object's methods, or gets/sets one of its properties.

IADs Methods Description
get_Name Gets the object's relative name.
get_Class Gets the object's schema class name.
get_GUID Gets the object's globally unique identifier.
get_ADsPath Gets the object's ADsPath that uniquely identifies this object from all others.
get_Parent Gets the object's ADsPath string for its parent container.
get_Schema Gets the ADsPath string to the schema class definition object for this object.
GetInfo Reloads the property values for this object as they exist in the underlying directory service.
SetInfo Saves the changes on this object and its dependents.
Get Gets the value for a property by name.
Put Sets the value for a property by name.
GetEx Gets the value for a single or multi-valued property by name.
PutEx Sets the value for a single or multi-valued property by name.
GetInfoEx Reloads specific property values for this object as they exist in the underlying directory service.