NtRollbackTransaction function

The ZwRollbackTransaction routine initiates a rollback operation for a specified transaction.

Syntax

__kernel_entry NTSYSCALLAPI NTSTATUS NtRollbackTransaction(
  HANDLE  TransactionHandle,
  BOOLEAN Wait
);

Parameters

TransactionHandle

A handle to a transaction object that was obtained by a previous call to ZwCreateTransaction or ZwOpenTransaction. The handle must have TRANSACTION_ROLLBACK access to the object.

Wait

A Boolean value that the caller sets to TRUE for synchronous operation or FALSE for asynchronous operation. If this parameter is set to TRUE, the call does not return until the rollback operation is complete.

Return value

ZwRollbackTransaction returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:

Return code Description
STATUS_OBJECT_TYPE_MISMATCH
The handle that the TransactionHandle parameter specifies is not a handle to a transaction object.
STATUS_INVALID_HANDLE
An object handle is invalid.
STATUS_ACCESS_DENIED
The caller does not have appropriate access to the transaction object.
STATUS_TRANSACTION_ALREADY_COMMITTED
The transaction cannot be rolled back because it has already been committed.
STATUS_TRANSACTION_REQUEST_NOT_VALID
The transaction has not been committed but its current state does not permit rollback.
STATUS_PENDING
Rollback 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 ZwRollbackTransaction, see Handling Rollback Operations.

NtRollbackEnlistment and ZwRollbackEnlistment are two versions of the same Windows Native System Services routine.

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

   
Minimum supported client Available in Windows Vista and later operating system versions.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules PowerIrpDDis, HwStorPortProhibitedDDIs

See also

Using Nt and Zw Versions of the Native System Services Routines

ZwCommitTransaction

ZwCreateTransaction

ZwOpenTransaction

ZwQueryInformationTransaction