Export (0) Print
Expand All

ZwRollbackTransaction routine

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

Syntax


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

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 codeDescription
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.

Requirements

Version

Available in Windows Vista and later operating system versions.

Header

Wdm.h (include Wdm.h or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

ZwCommitTransaction
ZwCreateTransaction
ZwOpenTransaction
ZwQueryInformationTransaction

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft