Directory Services |
The IADsGroup interface is a dual interface that inherits from IADs. It manages group membership data in a directory service. It enables you to get member objects, test if a given object belongs to the group, and to add, or remove, an object to, or from, the group.
The IADsGroup interface inherits the methods of the standard COM interfaces:
In addition, IADsGroup defines the following methods.
Method | Description |
---|---|
get_Description | Gets and sets the description of the group membership. |
put_Description | Gets and sets the description of the group membership. |
Members | Gets an IADsMembers interface on the members object that is the collection of ADSI objects that represent the members of this group. |
IsMember | Verifies membership. |
Add | Adds an object to a group. |
Remove | Removes an object from a group. |
The IADsGroup interface defines the following property. The preceding table includes access methods for this property.
Property | Description |
---|---|
Description | Gets and sets the description of the group membership. |
The following code example shows how to bind to the Power Users group using the WinNT provider.
Dim group As IADsGroup Set group = GetObject("WinNT://Fabrikam/Power Users")
The following code example works with the LDAP provider:
Dim group As IADsGroup Set group = GetObject("LDAP://CN=Power Users,DC=Fabrikam,DC=com")
The following code example binds to the Power Users group through the WinNT provider.
IADsGroup *pGroup; HRESULT hr; LPWSTR adsPath = L"WinNT://Fabrikam/Power Users"; hr = ADsGetObject(adsPath,IID_IADsGroup,(void**)&pGroup);
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.