This documentation is archived and is not being maintained.


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Retrieves the Group list contained in the Messenger object. The retrieved list is a MessengerGroups collection object that can be manipulated by the IMessengerGroups interface. Not scriptable.

   retval] IDispatch** ppMGroups


Return value. Pointer to a pointer to an IDispatch interface. In practice, this returns the IMessengerGroups interface on the contact list or MessengerGroups collection object.

Returns one of the following values. For managed code applications, these return values are received in the form of a COMException.




An error occurred during the list creation.


ppMGroups is a null pointer.


The current service does not support groups.

ppMGroups should be released when it is no longer needed. Retrieved lists can potentially have zero members in their collection.

If this property is called while the client is not signed in, the HRESULT is S_OK and a true object is returned. However, the resulting MessengerGroups collection object will have zero members (that is, it contains no valid MessengerGroups objects).

The following example code instantiates an IMessengerGroups object, calls the IMessenger2::MyGroups method on communicator, the Messenger Cocreatable object, and iterates over the collection of IMessengerGroup objects to display the group name on the application console. For more information about the IMessengerGroup interface, see IMessengerGroup.

if (communicator != null)
   IMessengerGroups myGroups;
       myGroups = (IMessengerGroups)communicator.MyGroups;
       if (myGroups != null)
          foreach (IMessengerGroup myGroup in myGroups)
              Console.WriteLine("Group: " + myGroup.Name);
   catch (COMException CGCE)


Requires Microsoft DirectX 9.0, C Runtime libraries (msvcm80.dll) on Microsoft Windows© Vista, Microsoft Windows XP Service Pack 1 (SP1) or later, or Microsoft Windows 2000 with Service Pack 4 (SP4). Any Communicator-imposed restrictions apply. .


Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.


Microsoft Office Communicator 2007 Automation API

IDL file