#ifndef _NTTMAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRollbackTransaction(
_In_ HANDLE TransactionHandle,
_In_ BOOLEAN Wait
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwRollbackTransaction(
_In_ HANDLE TransactionHandle,
_In_ BOOLEAN Wait
);
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 referenceThe ZwRollbackTransaction routine initiates a rollback operation for a specified transaction.
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.
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.
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.
Using Nt and Zw Versions of the Native System Services Routines
The ZwRollbackTransaction routine initiates a rollback operation for a specified transaction.
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.
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.
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.
Using Nt and Zw Versions of the Native System Services Routines