Export (0) Print
Expand All

ITransaction::Abort

This method aborts the transaction.

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

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

fRetaining
[in] Must be FALSE.

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

S_OK
Success: the transaction was successfully aborted.

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

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

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

XACT_E_CANTRETAIN
Retaining Abort is not supported. This call was ignored.

E_FAIL
The transaction failed to abort for an unspecified reason.

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

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

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

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

Platforms: Windows 2000, Windows XP, Windows Server 2003

Header: Declared in transact.h

Show:
© 2014 Microsoft