DMessengerEvents::OnGroupRemoved
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 request to remove a contact group. Not scriptable.
Syntax
HRESULT OnGroupRemoved(
[in] LONG hr,
[in] IDispatch* pMGroup
);
Parameters
hr
[in] Success or error code as a LONG. The possible values are:- S_OK. A group is successfully deleted.
- MSGR_E_GROUP_DOES_NOT_EXIST. The name of the group to be removed cannot be found.
- pMGroup
[in] Pointer to an IDispatch interface on the IMessengerGroup object that corresponds to the removed group.
Return Value
The implementer of this event handler will determine what value should be returned.
Remarks
The local user can request the removal of a contact group using the Office Communicator UI or a custom application. The results of the request from either local client are returned asynchronously with this event. The hr parameter indicates the success of the request when it contains a zero value (S_OK). If the Office Communicator server is successful, this event can be used to remove the group from the custom application contact list.
Example
The example code below will update the custom application contact list and display the name of the removed group if the hr parameter of the event handler indicates success.
void communicator_OnGroupRemoved(
int hr,
object pMGroup)
{
if (hr == 0)
{
IMessengerGroup imGroup = (IMessengerGroup)pMGroup;
StringBuilder sb = new StringBuilder();
sb.Append(
" GROUP REMOVED: 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