Transaction Objects
Transaction objects represent transactions. A transactional client creates a transaction, performs some work, and the either commits or rolls back the transaction.
KTM provides a set of transaction object routines that kernel-mode transactional clients can call. KTM also provides a similar set of user-mode routines that user-mode applications can call. For more information about the user-mode routines, see the Microsoft Windows SDK.
KTM creates a transaction object when a client calls ZwCreateTransaction. The client can call either ZwCommitTransaction or ZwRollbackTransaction to commit or roll back the transaction.
TPS components can call ZwOpenTransaction to open additional handles to a transaction object.
Clients close their handles to transaction objects by calling ZwClose. If the last handle is closed before the transaction object has been committed, KTM sends TRANSACTION_NOTIFY_ROLLBACK notifications to all resource managers that have an enlistment for the transaction.
The operating system deletes the object after the last handle is closed and KTM has released all its references to the object.