Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.85 KB

collections-and-groups.md

File metadata and controls

24 lines (18 loc) · 1.85 KB
title description ms.assetid ms.tgt_platform keywords ms.topic ms.date
Collections and Groups
ADSI uses collection objects to represent any arbitrary set of items in a directory service that can be represented using the same data type.
03257cc9-f354-4e1c-8880-936a7acac3ef
multiple
ADSI ADSI ,using,collections and groups
collections ADSI
groups ADSI
article
05/31/2018

Collections and Groups

ADSI uses collection objects to represent any arbitrary set of items in a directory service that can be represented using the same data type. Collection objects are defined as a set of VARIANT values, representing any of the valid Automation data types. Collection objects can represent both persistent information such as access-control lists and volatile information such as print jobs in a print queue.

The standard COM convention for listing the contents of a collection (or container) object is to create an enumerator object that supports IEnumVARIANT, which has methods to step through the list of collection objects. The interfaces in ADSI that supply the get__NewEnum method (note the two underscores) are IADsContainer, IADsMembers and IADsCollection. ADSI also supplies the helper functions ADsBuildEnumerator and ADsEnumerateNext for C and C++ programs to simplify enumeration. Automation clients use enumeration implicitly when they call Next in a For loop.

Groups are simply collections of objects supporting the IADsMembers interface.