Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IMessengerGroup::Name

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 name of a contact group. Not scriptable.


HRESULT Name(
   [out,
   retval] BSTR* bstrName
);

bstrName

The name of the group.

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

S_OK

Success.

RPC_X_NULL_REF_POINTER

ppMContacts is a null pointer.

E_OUTOFMEMORY

An error occurred during the list creation.

This property returns a string that represents the name of the contact group as displayed in the Office Communicator UI.

The following example code instantiates an IMessengerGroups object, calls the IMessenger2::MyGroups method on communicator, and iterates over the collection of IMessengerGroup objects to display the group name on the application console.

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

Client

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. .

Server

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

Product

Microsoft Office Communicator 2007 Automation API

IDL file

Msgrua.idl

Community Additions

ADD
Show:
© 2015 Microsoft