Microsoft Chat Server SDK Reference

IChatUserCallBack::OnProtocolMessageOut

This notification allows an extension to modify or cancel a protocol message that is sent to the user.

Syntax

C/C++:
HRESULT OnProtocolMessageOut(
   IChatUser *User,
   BSTR *Message,
   VARIANT_BOOL PostUpdate,
   long *Cancel);
Visual Basic:
Function IChatUserCallBack_OnProtocolMessageOut( _
   ByVal User As CHATSVCLib.IChatUser, _
   ByRef Message As String, _
   ByVal PostUpdate As Boolean) As Long

Parameters

User
Reference to the ChatUser object representing the user who will receive the message.
Message
The text of the protocol message. The extension can modify Message during the pre-update notification.
PostUpdate
False if this is a pre-update notification. True if the message was sent.
Cancel
Return value. Set to non-zero during the pre-update notification to cancel the operation.

Remarks

Because this notification is triggered whenever the chat service sends messages to the client, the extension's implementation of this method should be as efficient as possible.


© 1998 Microsoft Corporation. All rights reserved.