Share via


IRTCSession::SendMessage

This method sends an instant message. The session must be of type RTCST_IM.

HRESULT SendMessage(
  BSTR bstrMessageHeader,
  BSTR bstrMessage,
  LONG_PTR lCookie
);

Parameters

  • bstrMessageHeader
    [in] The MIME header for the message.
  • bstrMessage
    [in] The message to send.
  • lCookie
    [in] Pointer to an application-provided value used as an identification number for the message. This value is later used to pair the received notification with the message. See the Remarks section.

Return Values

This method can return an RTC_E_ constant. The following table shows the possible return values.

Value Description
RTC_E_INVALID_SESSION_STATE Message state must be RTCSS_INPROGRESS, RTCSS_INCOMING, or RTCSS_CONNECTED.
RTC_E_INVALID_SESSION_TYPE Session must be of type RTCST_IM.

Remarks

Completion is notified with an RTCE_MESSAGING event of type RTCMSET_MESSAGE.

Security Note   This method can send data over the network in unencrypted form. Therefore, someone eavesdropping on the network might be able to read the data. Before using this method in an unencrypted session, consider the security risk of sending the data in clear text. The application can encrypt an RTC session by specifying TLS in the profile used for the session.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCSession::SendMessageStatus

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.