Messenger.PeekMessage
Messenger
See also
Returns an incoming message and leaves it in the queue.
[C++]
bool PeekMessage(MCMessage* Message);
[Pascal]
function PeekMessage(var Message : TMCMessage) : boolean;
[VB6]
Function PeekMessage(Message As IMCXMessage) As Boolean
[ActiveX]
HRESULT _stdcall PeekMessage([out] IMCXMessage ** Message, [out, retval] VARIANT_BOOL * res);
[C#]
public bool PeekMessage(ref MCMessage Message);
[VB.NET]
Public Function PeekMessage(ByRef Message As MCMessage) As Boolean
[Java]
public boolean peekMessage(MCMessage message);
[Java ME]
public synchronized boolean peekMessage(MCMessage message);
[Palm]
bool PeekMessage(MCMessage* Message);
[DLL]
long __stdcall MCMessengerPeekMessage(HMCMessenger h, MCMessage* Message, bool* res);
- [DLL]h - handle to the Messenger object that was returned by Create method
- Message - The structure that PeekMessage places all message data to. See more here
- res - result of method execution (see Return value for details)
True if the message was found and false if there was no incoming message waiting for handing
[DLL]
Return value is passed via res parameter.
If the function was called not from the same thread in which Messenger operates, MCE_WRONGTHREAD code is returned, otherwise MC_OK is returned.
Call this method to peek the message from the input queue. This method returns immediately, returning the value that lets you determine whether there was a message in the queue. Upon return the message is NOT marked as being processed and the next call to PeekMessage will return the same message.
Once the message was processed, the application must call MessageProcessed method to let the Messenger send reply (if necessary) and cleanup internal records.
This method together with GetMessage and MessageProcessed is an alternative to using Queues.
|