TmRecoverTransactionManager function (wdm.h)

The TmRecoverTransactionManager routine reconstructs the state of the transaction manager object (including all transactions, enlistments, and resource managers) from the recovery information that is in the log stream.

Syntax

NTSTATUS TmRecoverTransactionManager(
  [in] PKTM           Tm,
  [in] PLARGE_INTEGER TargetVirtualClock
);

Parameters

[in] Tm

A pointer to a transaction manager object. To obtain this pointer, your TPS component must call ObReferenceObjectByHandle and supply the object handle that a previous call to ZwCreateTransactionManager or ZwOpenTransactionManager provided.

[in] TargetVirtualClock

A pointer to a virtual clock value. This parameter is optional and can be NULL. For more information about this parameter, see the following Remarks section. For Windows Vista, this parameter must be NULL.

Return value

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

Return code Description
STATUS_NOT_IMPLEMENTED
For Windows Vista, the caller specified a non-NULL value for the TargetVirtualClock parameter.
STATUS_TM_VOLATILE
The specified transaction manager object does not have a log file, so recovery is not available.
STATUS_UNSUCCESSFUL
The specified transaction manager object is in an unexpected state.
 

The routine might return other NTSTATUS values.

Remarks

The TmRecoverTransactionManager routine is a pointer-based version of the ZwRecoverTransactionManager routine.

Calling TmRecoverTransactionManager with a TargetVirtualClock parameter value of NULL is functionally equivalent to calling ZwRecoverTransactionManager. Calling TmRecoverTransactionManager with a non-NULL TargetVirtualClock parameter value is functionally equivalent to calling ZwRollforwardTransactionManager.

For more information about recovery operations, see Handling Recovery Operations.

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

See also

ZwRecoverTransactionManager

ZwRollforwardTransactionManager