ZwCommitEnlistment routine

The ZwCommitEnlistment routine initiates the commit operation for a specified enlistment's transaction.

Syntax


NTSTATUS ZwCommitEnlistment(
  _In_     HANDLE         EnlistmentHandle,
  _In_opt_ PLARGE_INTEGER TmVirtualClock
);

Parameters

EnlistmentHandle [in]

A handle to an enlistment object that was obtained by a previous call to ZwCreateEnlistment or ZwOpenEnlistment. The object must represent a superior enlistment and the handle must have ENLISTMENT_SUPERIOR_RIGHTS access to the object.

TmVirtualClock [in, optional]

A pointer to a virtual clock value. This parameter is optional and can be NULL.

Return value

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

Return codeDescription
STATUS_OBJECT_TYPE_MISMATCH

The specified handle is not a handle to an enlistment object.

STATUS_INVALID_HANDLE

The object handle is invalid.

STATUS_ACCESS_DENIED

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

STATUS_ENLISTMENT_NOT_SUPERIOR

The caller is not a superior transaction manager for the enlistment.

STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED

The caller did not register to receive TRANSACTION_NOTIFY_COMMIT_COMPLETE notifications.

STATUS_TRANSACTION_REQUEST_NOT_VALID

The enlistment's transaction is not in a state that allows it to be committed.

STATUS_TRANSACTION_NOT_ACTIVE

The commit operation for this transaction has already been started.

STATUS_TRANSACTION_ALREADY_ABORTED

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

 

The routine might return other NTSTATUS values.

Remarks

Only superior transaction managers can call ZwCommitEnlistment.

Callers of ZwCommitEnlistment must register to receive TRANSACTION_NOTIFY_COMMIT_COMPLETE notifications.

The ZwCommitEnlistment routine causes KTM to send TRANSACTION_NOTIFY_COMMIT notifications to all resource managers that have enlisted in the transaction.

For more information about ZwCommitEnlistment, see Creating a Superior Transaction Manager and Handling Commit Operations.

Requirements

Target platform

Universal

Version

Available in Windows Vista and later operating system versions.

Header

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

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

TmCommitEnlistment
ZwCreateEnlistment
ZwOpenEnlistment

 

 

Send comments about this topic to Microsoft

Show: