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


Messenger     See also    

Deletes message from the queue of messages to be sent.


    bool CancelMessage(__int64 MsgID);

    function CancelMessage(MsgID : Int64): Boolean;

    Function IIPCXMessenger3.CancelMessage(MsgID As String) As Boolean

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

    public bool CancelMessage(long MsgID);

    Public Function CancelMessage(ByVal MsgID As Long) As Boolean

    public synchronized boolean cancelMessage(long MsgID);

[Java ME]
    public synchronized boolean cancelMessage(long MsgID);

    bool CancelMessage(HIPCMessenger h, __int64 MsgID)


  • [DLL]h - handle to the Messenger object that was returned by Create method
  • MsgID - MsgID value of the message you want to delete.
  • 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 res parameter.


    This method can be useful after calling SendMessageCallback or SendMessageTimeoutCallback methods. CancelMessage tries to delete the message from outgoing queue.
    To choose the message you want to delete from queue use MsgID value of the IPCMessage structure.
    This method succeeds only if the message has not been sent yet. To avoid receiving a notification when the message has already been sent, use CancelMessageEx method.