Sends a message to the recipient and wait for result for specified time, optionally dispatching incoming messages.
bool SendMessageTimeout(char* Destination,
unsigned long Timeout,
function SendMessageTimeout(Destination : string;
var Message : TIPCMessage;
Timeout : DWORD;
Block : boolean;
Credentials : PIPCMessageCredentials,
var MsgResult : integer) : boolean;
Function SendMessageTimeout(Destination As String,
Message As IIPCXMessage,
Timeout As Long,
Block As Boolean,
Credentials As IPCXMessageCredentials,
MsgResult As Long) As Boolean
HRESULT _stdcall SendMessageTimeout(
[in] BSTR Destination,
[in] IIPCXMessage * Message,
[in] long Timeout,
[in] VARIANT_BOOL Block,
[in] IIPCXMessageCredentials * Credentials,
[in, out] long * MsgResult,
[out, retval] VARIANT_BOOL * res);
public boolean SendMessageTimeout(String Destination,
out int MsgResult);
Public Function SendMessageTimeout(ByVal Destination As String,
ByRef Message As IPCMessage,
ByVal Timeout As Integer,
ByVal Block As Boolean,
ByVal Credentials As IPCMessageCredentials,
ByRef MsgResult As Integer) As Boolean
public boolean sendMessageTimeout(String destination,
public synchronized boolean sendMessageTimeout(String destination,
long __stdcall IPCMessengerSendMessageTimeout(HIPCMessenger h,
unsigned long Timeout,
- [DLL]h - handle to the Messenger object that was returned by Create method
- Destination - The address of the message recipient. See more here
- Message - The message to be sent. See more here
- Timeout - Time (in milliseconds) after which the method marks the message as failed and returns. Setting this parameter to 0xFFFFFFFF ($FFFFFFFF) causes the method to wait infinitely for reply (in fact, waiting is stopped after time specified by MaxTimeout property elapses)
- Block - Defines whether the incoming messages should be processed while waiting.
If Block is true, no incoming messages are dispatched using DispatchMessages.
If Block is false, DispatchMessages method is called when new incoming messages appear in the input queue.
- Credentials - (optional) Credentials to be set for the message. Can be set to null (nil) if credentials system is not used. See more here
- MsgResult - the value that was placed to Result member of the IPCMessage structure when the message was handled
- [DLL, ActiveX]res - result of method execution (see Result for details)
Return value is true if the message was sent successfully or false if timeout has expired.
IPC_OK is always returned.
Call this method to send the message to some other messenger and wait for reply from the recipient for specified time, optionally dispatching incoming messages. Destination specifies the address of the recipient. This method determines the right transport to use and passes the message to the transport. If the transport was not found or the request didn't reach the recipient for some reason, an exception is raised. [DLL] Error is determined by return value.
For information about error and timeout handling see Error and Timeout Handling topic.