MSMQTransaction.Abort
Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista
The Abort method of the MSMQTransaction object, which identifies the underlying transaction object, terminates the transaction associated with the MSMQTransaction object.
Sub Abort( _
[ ByRef fRetaining As Variant ], _
[ ByRef fAsync As Variant ] _
)
Parameters
fRetaining
[in, optional] Boolean (in C++, a reference to a VARIANT containing a VARIANT_BOOL). The default is False. Reserved by Microsoft Distributed Transaction Coordinator (MS DTC).
fAsync
[in, optional] Boolean (in C++, a reference to a VARIANT containing a VARIANT_BOOL). The default is False. When fAsync is TRUE, an asynchronous abort is performed.
Return Values
This method has no return values.
Error Codes
For a complete list of error and information codes, see Message Queuing Error and Information Codes.
Remarks
After an abort, all actions taken on the queue are rolled back. For example, if a message is sent to a queue and the transaction is aborted, the messages are not delivered to the queue.
Abort is a wrapper for ITransaction::Abort. (For information on ITransaction::Abort, see the Platform SDK.)
For information on | See |
---|---|
The Message Queuing transaction model | Transactions |
The types of transaction supported by MSMQ | Transaction Types |
How Message Queuing sends and retrieves messages within a transaction | Sending and Retrieving Messages within a Transaction |
Requirements
Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Mqoai.h.
Library: Use Mqoa.lib.
See Also
MSMQCoordinatedTransactionDispenser.BeginTransaction
MSMQTransaction