ZwRecoverTransactionManager function (wdm.h)

The ZwRecoverTransactionManager 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

NTSYSCALLAPI NTSTATUS ZwRecoverTransactionManager(
  [in] HANDLE TransactionManagerHandle
);

Parameters

[in] TransactionManagerHandle

A handle to a transaction manager object that was obtained by a previous call to ZwCreateTransactionManager or ZwOpenTransactionManager. The handle must have TRANSACTIONMANAGER_RECOVER access to the object.

Return value

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

Return code Description
STATUS_OBJECT_TYPE_MISMATCH
The specified handle is not a handle to a transaction manager object.
STATUS_INVALID_HANDLE
An object handle is invalid.
STATUS_ACCESS_DENIED
The caller does not have appropriate access to the transaction manager object.
STATUS_TM_VOLATILE
The transaction manager object is volatile and, therefore, its transactions cannot be recovered.
STATUS_UNSUCCESSFUL
The transaction manager object is not in a state that allows recovery.
 

The routine might return other NTSTATUS values.

Remarks

The ZwRecoverTransactionManager routine tries to reconstruct the state of the transaction manager object, including all transactions, enlistments, and resource managers, from the recovery information that is in the object's log stream, beginning at the last restart area that KTM created and ending at the stream's end.

To recover up to a specific virtual time, use the ZwRollforwardTransactionManager routine instead of ZwRecoverTransactionManager.

Your TPS component must call ZwRecoverTransactionManager after it has called ZwCreateTransactionManager or ZwOpenTransactionManager.

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

NtRecoverTransactionManager and ZwRecoverTransactionManager are two versions of the same Windows Native System Services routine.

For calls from kernel-mode drivers, the NtXxx and ZwXxx versions of a Windows Native System Services routine can behave differently in the way that they handle and interpret input parameters. For more information about the relationship between the NtXxx and ZwXxx versions of a routine, see Using Nt and Zw Versions of the Native System Services 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, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)

See also

TmRecoverTransactionManager

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransactionManager

ZwOpenTransactionManager

ZwRollforwardTransactionManager