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


Messenger     See also    

Returns the transport name and the address of the Messenger that sent a message.


    void GetMessageSource(IPCMessage* Message, char* Buffer, int* BufferSize);

    function GetMessageSource(var Message : TIPCMessage) : string;

    Function GetMessageSource(Message As IIPCXMessage) As String

    HRESULT _stdcall GetMessageSource([in, out] IIPCXMessage ** Message, [out, retval] BSTR * Source );

    public string GetMessageSource(ref IPCMessage Message)

    Public Function GetMessageSource(ByRef Message As IPCMessage) As String

    public String getMessageSource(final IPCMessage message);

[Java ME]
    public synchronized String getMessageSource(final IPCMessage message);

    long __stdcall IPCMessengerGetMessageSource(HIPCMessenger h, IPCMessage* Message, char* Buffer, int* BufferSize);


  • [DLL]h - handle to the Messenger object that was returned by Create method

  • Buffer - The buffer into which the method will place the resulting value. The buffer must be large enough to hold all data (practically, we recommend 150 bytes for now). If you want to get the necessary size, pass NULL.
  • BufferSize - When calling the method, this parameter contains the size of the buffer. When the method returns and NULL was passed as Buffer, BufferSize will contain the necessary size for the buffer. When the method returns and the buffer was passed, BufferSize contains the number of characters copied excluding terminating NULL.
    Do NOT pass the small buffer, -- the method doesn't perform length checking when it copies the result.
  • Message - Reference to the message whose source is being queried. See more here

Return value

    The text that contains the part of the sender's address -- transport name and source address specific to the transport.


    Call this method to get the address of the message sender. As described in Message Addressing, the address constists of Transport identifier, destination address and Queue name. GetMessageSource function returns transport identifier and destination address. This method is useful when you need to send a separate message to the sender of originating message.

    Note: the address part of the result returned by GetMessageSource is specific to the transport and it can be not an address, but certain internal ID suitable for sending a message.