DMessengerEvents::OnGroupNameChanged

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.

Indicates the Office Communicator server has processed a group name change request. Not scriptable.

Syntax

HRESULT OnGroupNameChanged(
   [in] LONG hr,
   [in] IDispatch* pMGroup
);

Parameters

  • hr
    [in] Success or error code as a LONG. The possible values are:

    • S_OK. A group name is successfully changed.
    • MSGR_E_GROUP_NAME_TOO_LONG. The name of the group to be changed is too long.
    • MSGR_E_BAD_GROUP_NAME. The name of the group to be changed is invalid.
  • pMGroup
    [in] Pointer to an IDispatch interface on the IMessengerGroup object that corresponds to the group whose name change was requested.

Return Value

The implementer of this event handler will determine what value should be returned.

Remarks

The local client can request the change of a contact group name using the Office Communicator UI. The results of the request are returned asynchronously with this event. The hr parameter indicates the success of the request when it contains a zero value (S_OK). In the event of a successful name change, this event can be used to query the name property of the pMGroup argument.

Example

The example code uses the method parameter, pMGroup, to cast into an IMessengerGroup interface object. This allows the code to access the methods and properties of the interface. The IMessengerGroup::Name property is queried to display the new group name in the application console window.

void communicator_OnGroupNameChanged(
     int hr, 
     object pMGroup)
{
    if (hr == 0)
    {
        IMessengerGroup imGroup = (IMessengerGroup)pMGroup;
        StringBuilder sb = new StringBuilder();
        sb.Append(
           " GROUP NAME CHANGED: hresult" +
           formReturnErrors.returnComError(hr));

        sb.Append(
           " Group:" +
           imGroup.Name);

        Console.WriteLine(
                "EVENT: " +
                sb.ToString());

        if (myContactList != null)
            myContactList.loadContactList();
    }
}

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

See Also

Reference

DMessengerEvents