// wdm.h
NTSTATUS TmCommitEnlistment(
[in] PKENLISTMENT Enlistment,
[in] PLARGE_INTEGER TmVirtualClock
);
View the official Windows Driver Kit DDI referenceNo description available.
The TmCommitEnlistment routine initiates the commit operation for a specified enlistment's transaction.
Enlistment [in]A pointer to an enlistment object. Your component can receive this pointer as input to a ResourceManagerNotification callback routine. Alternatively, your component can call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateEnlistment, TmCreateEnlistment, or ZwOpenEnlistment provided.
TmVirtualClock [in]A pointer to a virtual clock value. This parameter is optional and can be NULL.
TmCommitEnlistment returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:
| Return code | Description |
|---|---|
| STATUS_ENLISTMENT_NOT_SUPERIOR | The caller is not a superior transaction manager for the enlistment. |
| STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED | The caller did not register to receive TRANSACTION_NOTIFY_COMMIT_COMPLETE notifications. |
| STATUS_TRANSACTION_REQUEST_NOT_VALID | The enlistment's transaction is not in a state that enables it to be committed. |
| STATUS_TRANSACTION_NOT_ACTIVE | The commit operation for this transaction has already been started. |
| STATUS_TRANSACTION_ALREADY_ABORTED | The transaction cannot be committed because it has been rolled back. |
The routine might return other NTSTATUS values.
The TmCommitEnlistment routine is a pointer-based version of the ZwCommitEnlistment routine.
Only superior transaction managers can call TmCommitEnlistment.
For information about when to use KTM's Tm*Xxx* routines instead of Zw*Xxx* routines, see Using TmXxx Routines.