NtCommitTransaction function (wdm.h)
The ZwCommitTransaction routine initiates a commit operation for a specified transaction.
Syntax
__kernel_entry NTSYSCALLAPI NTSTATUS NtCommitTransaction(
[in] HANDLE TransactionHandle,
[in] BOOLEAN Wait
);
Parameters
[in] TransactionHandle
A handle to a transaction object. Your component receives this handle from ZwCreateTransaction or ZwOpenTransaction. The handle must have TRANSACTION_COMMIT access to the object.
[in] Wait
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.
Return value
ZwCommitTransaction returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:
Return code | Description |
---|---|
|
The handle that was specified for the TransactionHandle parameter is not a handle to a transaction object. |
|
The specified transaction object handle is invalid. |
|
The caller does not have appropriate access to the transaction object. |
|
The caller cannot commit the transaction because a superior transaction manager exists. |
|
The transaction cannot be committed because it has been rolled back. |
|
The transaction is already committed. |
|
The commit operation for this transaction has already been started. |
|
Commit notifications have been queued to resource managers, and the caller specified FALSE for the Wait parameter. |
The routine might return other NTSTATUS values.
Remarks
For more information about how transaction clients should use the ZwCommitTransaction routine, see Creating a Transactional Client.
For more information about commit operations, see Handling Commit Operations.
For calls from kernel-mode drivers, the NtXxx and ZwXxx versions of a Windows Native System Services routine can behave differently in the way that they handle and interpret input parameters. For more information about the relationship between the NtXxx and ZwXxx versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later versions of Windows. |
Target Platform | Universal |
Header | wdm.h (include Wdm.h, Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | HwStorPortProhibitedDDIs, PowerIrpDDis |
See also
Using Nt and Zw Versions of the Native System Services Routines