Bewerken

Delen via


TmCommitTransaction function (wdm.h)

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

Syntax

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

Parameters

[in] Transaction

A pointer to a transaction object. To obtain this pointer, your TPS 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 TRUE, the call returns after the commit operation is complete.

Return value

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

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

The TmCommitTransaction routine is a pointer-based version of the ZwCommitTransaction 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

ZwCommitTransaction

ZwCreateTransaction

ZwOpenTransaction