Enumerating Container Objects

By convention, all items in an enumeration in ADSI must be of the same Automation data type. For example, an enumeration should not return some items as VARIANTs of type VT_I4 and others as VARIANTs of type VT_BSTR.

To enumerate a list of items that an object maintains, a client requests the creation of an enumeration object for the specific type of information being listed. In ADSI, the client may list the objects in namespace objects, generic container objects, collection objects, member objects, or schema objects. ADSI provides a filter that can be set and modified to limit the matches in any enumeration though IADsContainer::Filter. Examples of implementations of enumerator objects can be found in the example provider component code for the following ADs container objects.

Object type code
Generic Container cenumobj.cpp
Namespace Container cenumns.cpp
Schema Container cenumsch.cpp

For client-side information, see About Collections and Groups.