// wdm.h
NTSTATUS TmCommitTransaction(
[in] PKTRANSACTION Transaction,
[in] BOOLEAN Wait
);
View the official Windows Driver Kit DDI referenceNo description available.
The TmCommitTransaction routine initiates a commit operation for a specified transaction.
Transaction [in]A pointer to a transaction object. To obtain this pointer, your TPS component must call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateTransaction or ZwOpenTransaction provided.
Wait [in]A Boolean value that the caller sets to TRUE for synchronous operation or FALSE for asynchronous operation. If this parameter is TRUE, the call returns after the commit operation is complete.
TmCommitTransaction returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:
| Return code | Description |
|---|---|
| STATUS_TRANSACTION_SUPERIOR_EXISTS | The caller cannot commit the transaction because a superior transaction manager exists. |
| STATUS_TRANSACTION_ALREADY_ABORTED | The transaction cannot be committed because it has been rolled back. |
| STATUS_TRANSACTION_ALREADY_COMMITTED | The transaction is already committed. |
| STATUS_TRANSACTION_REQUEST_NOT_VALID | The commit operation for this transaction has already been started. |
| STATUS_PENDING | Commit notifications have been queued to resource managers, and the caller specified FALSE for the Wait parameter. |
The routine might return other NTSTATUS values.
The TmCommitTransaction routine is a pointer-based version of the ZwCommitTransaction routine.
For information about when to use KTM's Tm*Xxx* routines instead of Zw*Xxx* routines, see Using TmXxx Routines.