IADsCollection interface (iads.h)

The IADsCollection interface is a dual interface that enables its hosting ADSI object to define and manage an arbitrary set of named data elements for a directory service. Collections differ from arrays of elements in that individual items can be added or deleted without reordering the entire array.

Collection objects can represent one or more items that correspond to volatile data, such as processes or active communication sessions, as well as persistent data, such as physical entities for a directory service. For example, a collection object can represent a list of print jobs in a queue or a list of active sessions connected to a server. Although a collection object can represent arbitrary data sets, all elements in a collection must be of the same type. The data are of Variant types.

ADSI also exposes the IADsMembers and IADsContainer interfaces for manipulating two special cases of collection objects. IADsMembers is used for a collection of objects that share a common membership. An example of such objects are users that belong to a group. IADsContainer applies to an ADSI object that contains other objects. An example of this is a directory tree or a network topology.

Inheritance

The IADsCollection interface inherits from the IDispatch interface. IADsCollection also has these types of members:

Methods

The IADsCollection interface has these methods.

 
IADsCollection::Add

Adds a named item to the collection.
IADsCollection::get__NewEnum

The IADsCollection::get__NewEnum method gets a dependent enumerator object that implements IEnumVARIANT for this ADSI collection object. Be aware that there are two underscore characters in the function name (get__NewEnum).
IADsCollection::GetObject

Retrieves an item of the collection.
IADsCollection::Remove

The IADsCollection::Remove method removes the named item from this ADSI collection object.

Remarks

Of the ADSI system providers, only the WinNT provider supports this interface to handle active file service sessions, resources and print jobs.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header iads.h

See also

IADsContainer

IADsMembers

IDispatch