TmPrePrepareEnlistment routine

The TmPrePrepareEnlistment routine initiates the pre-prepare operation for a specified enlistment's transaction.

Syntax


NTSTATUS TmPrePrepareEnlistment(
  _In_ PKENLISTMENT   Enlistment,
  _In_ PLARGE_INTEGER TmVirtualClock
);

Parameters

Enlistment [in]

A pointer to an enlistment object. Your component can receive this pointer as input to a ResourceManagerNotification callback routine. Alternatively, your component can call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateEnlistment, TmCreateEnlistment, or ZwOpenEnlistment provided.

TmVirtualClock [in]

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

Return value

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

Return codeDescription
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_PREPREPARE_COMPLETE notifications.

STATUS_TRANSACTION_REQUEST_NOT_VALID

The transaction's state does not allow it to enter the pre-prepare phase.

STATUS_ACCESS_DENIED

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

 

The routine might return other NTSTATUS values.

Remarks

The TmPrePrepareEnlistment routine is a pointer-based version of the ZwPrePrepareEnlistment routine.

Only superior transaction managers can call TmPrePrepareEnlistment.

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

Requirements

Target platform

Universal

Version

Available in Windows Vista and later operating system versions.

Header

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

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

PASSIVE_LEVEL

See also

ObReferenceObjectByHandle
ResourceManagerNotification
TmCreateEnlistment
ZwCreateEnlistment
ZwOpenEnlistment
ZwPrePrepareEnlistment

 

 

Send comments about this topic to Microsoft

Show: