IRTCSession::SendMessage (Windows CE 5.0)
This method sends an instant message. The session must be of type RTCST_IM or RTCST_MULTIPARTY_IM.
HRESULT SendMessage(BSTR bstrMessageHeader,BSTR bstrMessage,LONG_PTR lCookie);
Parameters
bstrMessageHeader
[in] The MIME header for the message.This is the content type of the message to be sent. CR and LF characters are not allowed in this string.
bstrMessage
[in] The message that is sent.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 additional information about specific 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 | IRTCSession::SendMessageStatus
Send Feedback on this topic to the authors