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


Messenger     See also    

Deletes the message from the outgoing or complete message queues.


    bool CancelMessageEx(__int64 MsgID, bool CancelComplete);

    function CancelMessageEx(MsgID : Int64; CancelComplete : boolean): Boolean;

    Function IIPCXMessenger3.CancelMessageEx(MsgID As String, CancelComplete As Boolean) As Boolean

    HRESULT _stdcall IIPCXMessenger3.CancelMessageEx([in] BSTR MsgID, [in] VARIANT_BOOL CancelComplete, [out, retval] VARIANT_BOOL * res);

    public bool CancelMessageEx(long MsgID, bool CancelComplete);

    Public Function CancelMessageEx(ByVal MsgID As Long, ByVal CancelComplete As Boolean) As Boolean

    public synchronized boolean cancelMessageEx(long MsgID, boolean CancelComplete);

[Java ME]
    public synchronized boolean cancelMessageEx(long MsgID, boolean CancelComplete);

    bool CancelMessageEx(HIPCMessenger h, __int64 MsgID, bool CancelComplete)


  • [DLL]h - handle to the Messenger object that was returned by Create method
  • MsgID - MsgID value of the message you want to delete.
  • CancelComplete - This parameter defines if the queue of complete messages is to be searched for the message.
  • res - result of method execution (see Return value for details)

Return value

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 IPCMessage 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.