Filter: C++  Pascal  C#  VB.NET  Java  Java ME  ActiveX  DLL 



Messenger.CreateMessageFromText

Messenger     See also    


Sets properties (fields) of IPCMessage structure including binary data (created from text string).

Declaration

[C++]
    static void CreateMessageFromText( long MsgCode, long Param1, long Param2, char* Text, bool IsVarData, IPCMessage& Message);

[Pascal]
    class function CreateMessageFromText( MsgCode : integer; Param1 : integer; Param2 : integer; Text : string; IsVarData : boolean ) TIPCMessage;

[VB6]
    Function IIPCXMessenger4.CreateMessageFromText(MsgCode As Long, Param1 As Long, Param2 As Long, Text As String, IsVarData As Boolean) As IIPCXMessage

[ActiveX]
    HRESULT _stdcall IIPCXMessenger4.CreateMessageFromText( [in] long MsgCode, [in] long Param1, [in] long Param2, [in] BSTR Text, [in] VARIANT_BOOL IsVarData, [out, retval] IIPCXMessage ** Message);

[C#]
    static IPCMessage CreateMessageFromText( int MsgCode, int Param1, int Param2, string Text, Encoding Encoder, bool IsVarData );

[VB.NET]
    Public Shared Function CreateMessageFromText(ByVal MsgCode As Integer, ByVal Param1 As Integer, ByVal Param2 As Integer, ByVal [Text] As String, ByVal Encoder As Encoding, ByVal IsVarData As Boolean) As IPCMessage

[Java]
    static IPCMessage createMessageFromText( int msgCode, int param1, int param2, String text, CharsetEncoder encoder, boolean isVarData );

[Java ME]
    static IPCMessage createMessageFromText( int msgCode, int param1, int param2, String text, CharsetEncoder encoder, boolean isVarData );

[DLL]
    void __stdcall IPCMessengerCreateMessageFromText( long MsgCode, long Param1, long Param2, char* Text, bool IsVarData, IPCMessage& Message);

Parameters

  • MsgCode - application-defined message code. Use this message code to identify the message on the recipient side.
  • Param1 - application-defined parameter of the message.
  • Param2 - application-defined parameter of the message.
  • Text - text which is converted to binary and placed to IPCMessage.
  • [.NET, Java] Encoder - encoding object (can be null).
  • IsVarData - false if DataType is set to bdtConst and true if DataType is set to bdtVar.
  • Message - The record that CreateMessageFromText creates (when Message is a function result) and filled with specified parameters. See more here

Description

    Use this method to initialize main fields and convert text to binary data of IPCMessage with one call. This method converts the text into system-default (by default) or specific (if Encoder is specified) character set and puts the resulting binary data to Data field of IPCMessage.
    [C++, Pascal, DLL] After sending the message application needs to free the memory, referenced by Data field, using IPCMemFree procedure.