ITransactionContextEx interface (comsvcs.h)

Provides basic methods for a generic transactional object that begins a transaction. By calling the methods of this interface, you can compose the work of multiple COM+ objects in a single transaction and explicitly commit or abort the transaction.

ITransactionContext and ITransactionContextEx provide the same functionality, but unlike ITransactionContextEx, ITransactionContext is compatible with Automation.

Inheritance

The ITransactionContextEx interface inherits from the IUnknown interface. ITransactionContextEx also has these types of members:

Methods

The ITransactionContextEx interface has these methods.

 
ITransactionContextEx::Abort

Aborts the work of all COM objects participating in the current transaction. The transaction ends on return from this method. (ITransactionContextEx.Abort)
ITransactionContextEx::Commit

Attempts to commit the work of all COM objects participating in the current transaction. The transaction ends on return from this method. (ITransactionContextEx.Commit)
ITransactionContextEx::CreateInstance

Creates a COM object that can execute within the scope of the transaction that was initiated by the transaction context object. (ITransactionContextEx.CreateInstance)

Remarks

Using the transaction context object to control a transaction limits the reuse of the business logic driving the transaction and should be used sparingly.

You obtain a reference to the ITransactionContext interface by creating a transaction context object with the appropriate call, as in the following example.

hr = CoCreateInstance(
       CLSID_TransactionContextEx, 
       NULL, 
       CLSCTX_INPROC,
       IID_ITransactionContextEx, 
       (void**)&m_pTransactionContext);

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

Configuring Transactions

ITransactionContext

TransactionContextEx