Deletes the message from the outgoing or complete message queues.
Function IMCXMessenger3.CancelMessageEx(MsgID As String, CancelComplete As Boolean) As Boolean
HRESULT _stdcall IMCXMessenger3.CancelMessageEx([in] BSTR MsgID, [in] VARIANT_BOOL CancelComplete, [out, retval] VARIANT_BOOL * res);
True if message was successfully deleted.
False if message was not deleted.
Return value is passed via Result parameter.
This method can be useful after calling SendMessageCallback or SendMessageTimeoutCallback methods.
CancelMessageEx tries to delete the message from outgoing queue and, if CancelComplete parameter is true, from the queue of complete messages.
To choose the message you want to delete from queue use MsgID value of the MCMessage structure.
This method lets you cancel not only the message pending for delivery, but also already complete message. Of course, this doesn't mean that the message is returned back. Cancelling a message lets you avoid getting a notification via callback method that in other case would be called.