TwclMessageReceiver.Post(TwclMessage,Boolean) Method
Places a message to the messages queue and starts processing the messages.
public function Post(const Message: TwclMessage; const Sync: Boolean = False): Integer;
Parameters
- Message
- Type: TwclMessage
The TwclMessage object. A caller is responsible to dispose the message object passed into the method.
- Sync
- Type: Boolean
If the
Syncparameter isTrueand the thread that called the method is the same that used to call theOpenmethod the message will be delivered without placing it to the messages queue.If the thread that posting the message is different from one that was used to call the
Openmethod or theSyncparameter isFalse(the default value) the message will be placed to the messages queue.
Return Value
If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.
If sync messages is posted it can be processed before any other messages in the queue.