TmRollbackTransaction function (wdm.h)

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

Syntax

NTSTATUS TmRollbackTransaction(
  [in] PKTRANSACTION Transaction,
  [in] BOOLEAN       Wait
);

Parameters

[in] Transaction

A pointer to a transaction object. To obtain this pointer, your component must call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateTransaction or ZwOpenTransaction provided.

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

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

Return code Description
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

The TmRollbackTransaction routine is a pointer-based version of the ZwRollbackTransaction routine.

For information about when to use KTM's TmXxx routines instead of ZwXxx routines, see Using TmXxx Routines.

Requirements

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

See also

ObReferenceObjectByHandle

ZwCreateTransaction

ZwOpenTransaction

ZwRollbackTransaction