NtRecoverTransactionManager - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTTMAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtRecoverTransactionManager(
    _In_ HANDLE TransactionManagerHandle
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwRecoverTransactionManager(
    _In_ HANDLE TransactionManagerHandle
    );

#endif

View code on GitHub
// wdm.h

__kernel_entry NTSYSCALLAPI NTSTATUS NtRecoverTransactionManager(
  [in] HANDLE TransactionManagerHandle
);
View the official Windows Driver Kit DDI reference
// wdm.h

NTSYSCALLAPI NTSTATUS ZwRecoverTransactionManager(
  [in] HANDLE TransactionManagerHandle
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit here and here.

Windows Driver Kit DDI reference (nf-wdm-ntrecovertransactionmanager)

NtRecoverTransactionManager function

Description

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.

Parameters

TransactionManagerHandle [in]

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 Nt*Xxx* and Zw*Xxx* 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 Nt*Xxx* and Zw*Xxx* versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.

See also

TmRecoverTransactionManager

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransactionManager

ZwOpenTransactionManager

ZwRollforwardTransactionManager


Windows Driver Kit DDI reference (nf-wdm-zwrecovertransactionmanager)

ZwRecoverTransactionManager function

Description

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.

Parameters

TransactionManagerHandle [in]

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 Nt*Xxx* and Zw*Xxx* 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 Nt*Xxx* and Zw*Xxx* versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.

See also

TmRecoverTransactionManager

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransactionManager

ZwOpenTransactionManager

ZwRollforwardTransactionManager