TmRecoverEnlistment function (wdm.h)
The TmRecoverEnlistment routine initiates a recovery operation for the transaction that is associated with a specified enlistment.
Syntax
NTSTATUS TmRecoverEnlistment(
[in] PKENLISTMENT Enlistment,
[in] PVOID EnlistmentKey
);
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] EnlistmentKey
A pointer to the enlistment key value that the resource manager previously specified as the EnlistmentKey parameter to ZwCreateEnlistment or TmCreateEnlistment. This parameter is optional and can be NULL if the resource manager did not provide an enlistment key when it called ZwCreateEnlistment or TmCreateEnlistment.
Return value
TmRecoverEnlistment returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:
Return code | Description |
---|---|
|
The specified handle is not a handle to an enlistment object. |
|
An object handle is invalid. |
|
The transaction or its enlistment is not in the correct state. |
|
KTM has added a commit, rollback, or in-doubt notification to the resource manager's notification queue, and the resource manager is not using a ResourceManagerNotification callback routine. |
The routine might return other NTSTATUS values.
Remarks
The TmRecoverEnlistment routine is a pointer-based version of the ZwRecoverEnlistment routine.
For information about when to use KTM's TmXxx routines instead of ZwXxx routines, see Using TmXxx Routines.
For more information about recovery operations, see Handling Recovery Operations.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later versions of Windows. |
Target Platform | Universal |
Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | PASSIVE_LEVEL |