The IADsUser::Groups method obtains a collection of the ADSI group objects to which this user belongs. The method returns an IADsMembers interface pointer through which you can enumerate all the groups in the collection.
HRESULT Groups( IADsMembers **ppGroups );
This method supports the standard return values, including S_OK. For other return values, see ADSI Error Codes.
|Windows version||Windows Vista Windows Server 2008|