Microsoft Chat Server SDK Reference

IChatUserCallBack::OnProtocolMessageIn

This notification allows an extension to modify or cancel a protocol message sent by the user before it is received by the chat service.

Syntax

C/C++:
HRESULT OnProtocolMessageIn(
   IChatUser *User,
   BSTR *Message,
   VARIANT_BOOL PostUpdate,
   long *Cancel);
Visual Basic:
Function IChatUserCallBack_OnProtocolMessageIn( _
   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 sent 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 user interacts with the chat service, the extension's implementation of this method should be as efficient as possible.


© 1998 Microsoft Corporation. All rights reserved.