Retrieves the name of a contact group. Not scriptable.
Syntax
HRESULT Name( [out, retval] BSTR* bstrName ); |
Parameters
- bstrName
-
The name of the group.
Return Value
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.
Remarks
This property returns a string that represents the name of the contact group as displayed in the Office Communicator UI.
Example
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.
Copy Code | |
---|---|
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()); } } |
Requirements
- 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