Discuss this help topic in MsgConnect Forum

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



Messenger.CancelMessage

Messenger     See also    


Deletes message from the queue of messages to be sent.

Declaration

[C++]
    bool CancelMessage(__int64 MsgID);

[Pascal]
    function CancelMessage(MsgID : Int64): Boolean;

[VB6]
    Function IMCXMessenger3.CancelMessage(MsgID As String) As Boolean

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

[C#]
    public bool CancelMessage(long MsgID);

[VB.NET]
    Public Function CancelMessage(ByVal MsgID As Long) As Boolean

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

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

[DLL]
    bool CancelMessage(HMCMessenger h, __int64 MsgID)

Parameters

  • [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.
[ActiveX]
    Return value is passed via res parameter.

Description

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

Discuss this help topic in MsgConnect Forum