Platform SDK: Active Directory, ADSI, and Directory Services |
The IADsCollection interface 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 re-ordering the entire array.
Collection objects can represent one or more items that correspond to volatile information (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 the 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 who share a common membership. An example of such objects are users belonging to a group. IADsContainer applies to an ADSI object containing other objects. An example of this is a directory tree or a network topology.
The IADsCollection interface is a dual interface. It exposes the following methods.
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 and sets one of its properties. |
IADsCollection methods | 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. |
Of the ADSI system providers, only the WinNT and NWCOMPAT providers support this interface to handle active file service sessions, resources and print jobs.
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
Windows 95/98: Requires Windows 95 or later (with DSClient).
Header: Declared in Iads.h.