TmPrepareEnlistment function (wdm.h)
The TmPrepareEnlistment routine initiates the prepare operation for a specified enlistment's transaction.
Syntax
NTSTATUS TmPrepareEnlistment(
[in] PKENLISTMENT Enlistment,
[in] PLARGE_INTEGER TmVirtualClock
);
Parameters
[in] Enlistment
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.
[in] TmVirtualClock
A pointer to a virtual clock value. This parameter is optional and can be NULL.
Return value
TmPrepareEnlistment returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:
Return code | Description |
---|---|
|
The caller is not a superior transaction manager for the enlistment. |
|
The caller did not register to receive TRANSACTION_NOTIFY_PREPARE_COMPLETE notifications. |
|
The enlistment's transaction is not in a state that allows it to enter the prepare phase. |
|
The caller does not have appropriate access to the enlistment object. |
The routine might return other NTSTATUS values.
Remarks
The TmPrepareEnlistment routine is a pointer-based version of the ZwPrepareEnlistment routine.
Only superior transaction managers can call TmPrepareEnlistment.
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 |