ZwCommitTransaction routine

The ZwCommitTransaction routine initiates a commit operation for a specified transaction.

Syntax


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

Parameters

TransactionHandle [in]

A handle to a transaction object. Your component receives this handle from ZwCreateTransaction or ZwOpenTransaction. The handle must have TRANSACTION_COMMIT 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 TRUE, the call returns after the commit operation is complete.

Return value

ZwCommitTransaction 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 was specified for the TransactionHandle parameter is not a handle to a transaction object.

STATUS_INVALID_HANDLE

The specified transaction object handle is invalid.

STATUS_ACCESS_DENIED

The caller does not have appropriate access to the transaction object.

STATUS_TRANSACTION_SUPERIOR_EXISTS

The caller cannot commit the transaction because a superior transaction manager exists.

STATUS_TRANSACTION_ALREADY_ABORTED

The transaction cannot be committed because it has been rolled back.

STATUS_TRANSACTION_ALREADY_COMMITTED

The transaction is already committed.

STATUS_TRANSACTION_REQUEST_NOT_VALID

The commit operation for this transaction has already been started.

STATUS_PENDING

Commit 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 how transaction clients should use the ZwCommitTransaction routine, see Creating a Transactional Client.

For more information about commit operations, see Handling Commit Operations.

Requirements

Version

Available in Windows Vista and later versions of Windows.

Header

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

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

TmCommitTransaction
ZwCreateTransaction
ZwOpenTransaction

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft