EldoS
MsgConnect home / Documentation / Messenger.GetMessageSource method
Navigation
Web site
Support
Table Of Contents

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


Messenger.GetMessageSource

Messenger     See also    


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

Declaration

[C++]
    void GetMessageSource(MCMessage* Message, char* Buffer, int* BufferSize);

[Pascal]
    function GetMessageSource(var Message : TMCMessage) : string;

[VB6]
    Function GetMessageSource(Message As IMCXMessage) As String

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

[C#]
    public string GetMessageSource(ref MCMessage Message)

[VB.NET]
    Public Function GetMessageSource(ByRef Message As MCMessage) As String

[Java]
    public String getMessageSource(final MCMessage message);

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

[Palm]
    void GetMessageSource(const MCMessage* Message, char* Buffer, int* BufferSize);

[DLL]
    long __stdcall MCMessengerGetMessageSource(HMCMessenger h, MCMessage* Message, char* Buffer, int* BufferSize);

Parameters

  • [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 - The record that contains 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.

Description

    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, that the address part of the result returned by GetMessageSource is specific to the transport and it can be not an address, but some internal ID suitable for sending a message.

See also:     MCMessage structure    

 
Contact Us | Subscribe | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2005, EldoS Corporation