Updated: July 19, 2016

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

This method aborts the transaction.

HRESULT Abort(   BOID * pboidReason,  BOOL fRetaining,  BOOL fAsync);  

[in] An optional BOID that indicates why the transaction is being aborted. This argument may be NULL indicating that no abort reason is provided.

[in] Must be FALSE.

[in] When fAsync is TRUE, an asynchronous abort is performed and the caller must use ITransactionOutcomeEvents to learn the outcome of the transaction.

Success: the transaction was successfully aborted.

An asynchronous Abort was specified. The abort operation has begun but its outcome is not yet known. When the transaction completes, notification will be sent on the ITransactionOutcomeEvents interface if any connection point sinks are registered with the transaction object.

Unable to abort the transaction because it had already been committed or aborted. This call was ignored.

A Commit operation was already in progress. This call was ignored.

Retaining Abort is not supported. This call was ignored.

The transaction failed to abort for an unspecified reason.

An unexpected error has occurred. The transaction status is unknown.

An Abort operation was already in progress. This call was ignored.

This error can only be returned if the calling application did not initiate the transaction. This error implies that the MSDTC Proxy issued the abort operation on the MSDTC TM but before transaction manager could confirm that the transaction was aborted the connection between the proxy and the tm was broken. The transaction may have aborted or the transaction may still be active.

No longer able to communicate with the transaction manager because the connection to the transaction manager failed. The transaction state is unknown.

The initiator of the transaction may abort the transaction as may any resource manager enlisted on the transaction.

Abort may be invoked on a transaction repeatedly. XACT_S_ABORTING HRESULT will be returned following the first invocation of Abort.

If a communication failure occurs during a call to Commit or Abort, the status of the transaction is unknown.

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in transact.h


Community Additions