The TmRecoverEnlistment routine initiates a recovery operation for the transaction that is associated with a specified enlistment.
NTSTATUS TmRecoverEnlistment( PKENLISTMENT Enlistment, PVOID EnlistmentKey );
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.
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.
TmRecoverEnlistment returns STATUS_SUCCESS if the operation succeeds. Otherwise, this routine might return one of the following values:
||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.
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.
|Minimum supported client||Available in Windows Vista and later versions of Windows.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|