ITransactionOutcomeEvents Interface

This interface is used by application programs that require asynchronous notification about transaction outcomes. The application program implements the methods in this interface and registers the interface with the connection point mechanism. MS DTC calls the appropriate method on this interface to inform the application about the outcome of a transaction.

Implemented by: Application program
Object This object is implemented by the application program. The object must support the ITransactionOutcomeEvents interface
Interface Source The application program implements the methods in this interface
Called by: MS DTC proxy

Typically, ITransaction::Commit or Abort calls are performed synchronously. This means that the calling thread is blocked until MS DTC makes a commit or abort decision (usually at the end of phase one of the two-phase commit protocol).

It is possible to avoid blocking the calling thread by using asynchronous Commit or Abort calls. Asynchronous Commit or Abort require the following:

  1. The programmer creates an OLE event sink object which implements the ITransactionOutcomeEvents interface.
  2. The programmer uses the OLE events architecture on the MS DTC transaction object to register the event sink.
  3. Calls to ITransaction::Commit are passed the value XACTTC_ASYNC in the grfTC parameter. Calls to ITransaction::Abort are passed a Boolean flag of TRUE in the fAsync parameter. Neither call blocks the calling thread.
  4. After the transaction commits or aborts, the ITransactionOutcomeEvents::Commit or ITransactionOutcomeEvents::Abort method is called on the registered event sink.
For more information on Refer to
Asynchronous Commit and Abort requests ITransaction::Commit or ITransaction::Abort
OLE events architecture IConnectionPoint

The ITransactionOutcomeEvents events are raised when the transaction's outcome is known. On the root transaction manager's system, the transaction outcome event is raised at the end of phase one. On the subordinate transaction managers' systems, the transaction outcome events are raised at the beginning of phase two.

interface ITransactionOutcomeEvents : IUnknown
{
HRESULT Committed (
    [in]  BOOL      fRetaining,
    [in]  XACTUOW * pNewUOW, 
    [in]  HRESULT   hr);

HRESULT Aborted (
    [in]  BOID *    pboidReason,
    [in]  BOOL      fRetaining,
    [in]  XACTUOW * pNewUOW,
    [in]  HRESULT   hr);

HRESULT HeuristicDecision (
    [in]  DWORD    dwDecision,
    [in]  BOID *   pboidReason,
    [in]  HRESULT  hr);

HRESULT Indoubt ();
}