Condividi tramite


ITransactionOptions

 

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 interface contains methods that control the attributes of new transactions such as their time-out periods and descriptions.

This interface is used to get and set attributes within a transaction options object. The transaction options object can be passed as a parameter to the ITransactionDispenser::BeginTransaction method. The attributes of the transaction options object are inherited by the newly initiated transaction. This lets the caller of the BeginTransaction method to control the attributes of a transaction such as its time-out period and transaction description.

This interface is also used to get the transaction option attributes of an existing transaction object. It cannot be used to set the attributes, because the transaction has already begun.

When to Implement

You do not need to implement this interface. It is implemented by the transaction options object of the DTC Proxy, and by the ITransaction object. You can obtain a pointer to the ITransactionOptions interface by calling ITransactionDispenser::GetOptionsObject, or by calling IUnknown::QueryInterface on the ITransaction object.

When to Use

Application programs and resource managers that initiate transactions use this interface to control the attributes of new transactions.

Methods in Vtable Order

ITransactionOptions methods Description
SetOptions Alters transaction attributes in a transaction options object.
GetOptions Reads transaction attributes from a transaction options object.

Remarks

You obtain a pointer to this interface by calling the ITransactionDispenser::GetOptionsObject method.

Requirements

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

See Also

ITransactionDispenser