Directory Services

IADsCollection

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.

Methods in Vtable Order

The IADsCollection interface inherits the methods of the standard COM interfaces:

In addition, IADsCollection defines the following methods.

Method Description
get__NewEnum Gets an interface on an enumerator object.
Add Adds an object to the collection.
Remove Removes an object from the collection.
GetObject Gets the specified item.

Remarks

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

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.

See Also

IADsMembers, IADsContainer