IADsGroup *pGroup;
//
// Bind to a known group object.
//
ADsGetObject(TEXT("WinNT://MyDomain/Groups/Administrators"),
IID_IADsGroup,
(void**)&pGroup);
//
// Add Jane and John to the Administrators group.
//
pGroup->Add(TEXT("WinNT://MyDomain/Users/John"));
pGroup->Add(TEXT("WinNT://MyDomain/Users/Jane"));
//
// Cleanup.
//
pGroup->Release();