NtRollbackTransaction - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTTMAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtRollbackTransaction(
    _In_ HANDLE TransactionHandle,
    _In_ BOOLEAN Wait
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwRollbackTransaction(
    _In_ HANDLE TransactionHandle,
    _In_ BOOLEAN Wait
    );

#endif

View code on GitHub
// wdm.h

__kernel_entry NTSYSCALLAPI NTSTATUS NtRollbackTransaction(
  [in] HANDLE  TransactionHandle,
  [in] BOOLEAN Wait
);
View the official Windows Driver Kit DDI reference
// wdm.h

NTSYSCALLAPI NTSTATUS ZwRollbackTransaction(
  [in] HANDLE  TransactionHandle,
  [in] BOOLEAN Wait
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit here and here.

Windows Driver Kit DDI reference (nf-wdm-ntrollbacktransaction)

NtRollbackTransaction function

Description

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

Parameters

TransactionHandle [in]

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 [in]

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 Nt*Xxx* and Zw*Xxx* 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 Nt*Xxx* and Zw*Xxx* versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.

See also

Using Nt and Zw Versions of the Native System Services Routines

ZwCommitTransaction

ZwCreateTransaction

ZwOpenTransaction

ZwQueryInformationTransaction


Windows Driver Kit DDI reference (nf-wdm-zwrollbacktransaction)

ZwRollbackTransaction function

Description

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

Parameters

TransactionHandle [in]

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 [in]

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 Nt*Xxx* and Zw*Xxx* 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 Nt*Xxx* and Zw*Xxx* versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.

See also

Using Nt and Zw Versions of the Native System Services Routines

ZwCommitTransaction

ZwCreateTransaction

ZwOpenTransaction

ZwQueryInformationTransaction