NtQueryInformationTransactionManager - NtDoc

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

NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryInformationTransactionManager(
    _In_ HANDLE TransactionManagerHandle,
    _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass,
    _Out_writes_bytes_(TransactionManagerInformationLength) PVOID TransactionManagerInformation,
    _In_ ULONG TransactionManagerInformationLength,
    _Out_opt_ PULONG ReturnLength
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwQueryInformationTransactionManager(
    _In_ HANDLE TransactionManagerHandle,
    _In_ TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass,
    _Out_writes_bytes_(TransactionManagerInformationLength) PVOID TransactionManagerInformation,
    _In_ ULONG TransactionManagerInformationLength,
    _Out_opt_ PULONG ReturnLength
    );

#endif

View code on GitHub
// wdm.h

__kernel_entry NTSYSCALLAPI NTSTATUS NtQueryInformationTransactionManager(
  [in]            HANDLE                               TransactionManagerHandle,
  [in]            TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass,
  [out]           PVOID                                TransactionManagerInformation,
  [in]            ULONG                                TransactionManagerInformationLength,
  [out, optional] PULONG                               ReturnLength
);
View the official Windows Driver Kit DDI reference
// wdm.h

NTSYSCALLAPI NTSTATUS ZwQueryInformationTransactionManager(
  [in]            HANDLE                               TransactionManagerHandle,
  [in]            TRANSACTIONMANAGER_INFORMATION_CLASS TransactionManagerInformationClass,
  [out]           PVOID                                TransactionManagerInformation,
  [in]            ULONG                                TransactionManagerInformationLength,
  [out, optional] PULONG                               ReturnLength
);
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-ntqueryinformationtransactionmanager)

NtQueryInformationTransactionManager function

Description

The ZwQueryInformationTransactionManager routine retrieves information about a specified transaction manager object.

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_QUERY_INFORMATION access to the object.

TransactionManagerInformationClass [in]

A TRANSACTIONMANAGER_INFORMATION_CLASS-typed enumeration value that specifies the information to be obtained. This value must be one of the following:

The enumeration's TransactionManagerOnlineProbeInformation value is not used with ZwQueryInformationTransactionManager.

TransactionManagerInformation [out]

A pointer to a caller-allocated buffer that receives the information that the TransactionManagerInformationClass parameter specifies. The buffer's structure type must be TRANSACTIONMANAGER_BASIC_INFORMATION, TRANSACTIONMANAGER_LOG_INFORMATION, TRANSACTIONMANAGER_LOGPATH_INFORMATION, or TRANSACTIONMANAGER_RECOVERY_INFORMATION.

TransactionManagerInformationLength [in]

The length, in bytes, of the buffer that the TransactionManagerInformation parameter points to, including the length of any additional array elements that the caller has allocated to receive information.

ReturnLength [out, optional]

A pointer to a caller-allocated variable that receives the length, in bytes, of the information that KTM writes to the TransactionManagerInformation buffer. This parameter is optional and can be NULL.

Return value

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

Return code Description
STATUS_INVALID_INFO_CLASS The TransactionManagerInformationClass parameter's value is invalid.
STATUS_INFO_LENGTH_MISMATCH The length of the buffer that is specified by the TransactionManagerInformationLength parameter is incorrect.
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_BUFFER_TOO_SMALL The buffer that is specified by the TransactionManagerInformation parameter is too small.

The routine might return other NTSTATUS values.

Remarks

For more information about how to use ZwQueryInformationTransactionManager, see Using Log Streams with KTM.

NtQueryInformationTransactionManager and ZwQueryInformationTransactionManager 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

TRANSACTIONMANAGER_BASIC_INFORMATION

TRANSACTIONMANAGER_INFORMATION_CLASS

TRANSACTIONMANAGER_LOGPATH_INFORMATION

TRANSACTIONMANAGER_LOG_INFORMATION

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransactionManager

ZwOpenTransactionManager

ZwRecoverTransactionManager

ZwRollforwardTransactionManager


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

ZwQueryInformationTransactionManager function

Description

The ZwQueryInformationTransactionManager routine retrieves information about a specified transaction manager object.

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_QUERY_INFORMATION access to the object.

TransactionManagerInformationClass [in]

A TRANSACTIONMANAGER_INFORMATION_CLASS-typed enumeration value that specifies the information to be obtained. This value must be one of the following:

The enumeration's TransactionManagerOnlineProbeInformation value is not used with ZwQueryInformationTransactionManager.

TransactionManagerInformation [out]

A pointer to a caller-allocated buffer that receives the information that the TransactionManagerInformationClass parameter specifies. The buffer's structure type must be TRANSACTIONMANAGER_BASIC_INFORMATION, TRANSACTIONMANAGER_LOG_INFORMATION, TRANSACTIONMANAGER_LOGPATH_INFORMATION, or TRANSACTIONMANAGER_RECOVERY_INFORMATION.

TransactionManagerInformationLength [in]

The length, in bytes, of the buffer that the TransactionManagerInformation parameter points to, including the length of any additional array elements that the caller has allocated to receive information.

ReturnLength [out, optional]

A pointer to a caller-allocated variable that receives the length, in bytes, of the information that KTM writes to the TransactionManagerInformation buffer. This parameter is optional and can be NULL.

Return value

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

Return code Description
STATUS_INVALID_INFO_CLASS The TransactionManagerInformationClass parameter's value is invalid.
STATUS_INFO_LENGTH_MISMATCH The length of the buffer that is specified by the TransactionManagerInformationLength parameter is incorrect.
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_BUFFER_TOO_SMALL The buffer that is specified by the TransactionManagerInformation parameter is too small.

The routine might return other NTSTATUS values.

Remarks

For more information about how to use ZwQueryInformationTransactionManager, see Using Log Streams with KTM.

NtQueryInformationTransactionManager and ZwQueryInformationTransactionManager 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

TRANSACTIONMANAGER_BASIC_INFORMATION

TRANSACTIONMANAGER_INFORMATION_CLASS

TRANSACTIONMANAGER_LOGPATH_INFORMATION

TRANSACTIONMANAGER_LOG_INFORMATION

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransactionManager

ZwOpenTransactionManager

ZwRecoverTransactionManager

ZwRollforwardTransactionManager