NtSetInformationTransaction - NtDoc

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

NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationTransaction(
    _In_ HANDLE TransactionHandle,
    _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass,
    _In_reads_bytes_(TransactionInformationLength) PVOID TransactionInformation,
    _In_ ULONG TransactionInformationLength
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetInformationTransaction(
    _In_ HANDLE TransactionHandle,
    _In_ TRANSACTION_INFORMATION_CLASS TransactionInformationClass,
    _In_reads_bytes_(TransactionInformationLength) PVOID TransactionInformation,
    _In_ ULONG TransactionInformationLength
    );

#endif

View code on GitHub
// wdm.h

__kernel_entry NTSYSCALLAPI NTSTATUS NtSetInformationTransaction(
  [in] HANDLE                        TransactionHandle,
  [in] TRANSACTION_INFORMATION_CLASS TransactionInformationClass,
  [in] PVOID                         TransactionInformation,
  [in] ULONG                         TransactionInformationLength
);
View the official Windows Driver Kit DDI reference
// wdm.h

NTSYSCALLAPI NTSTATUS ZwSetInformationTransaction(
  [in] HANDLE                        TransactionHandle,
  [in] TRANSACTION_INFORMATION_CLASS TransactionInformationClass,
  [in] PVOID                         TransactionInformation,
  [in] ULONG                         TransactionInformationLength
);
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-ntsetinformationtransaction)

NtSetInformationTransaction function

Description

The ZwSetInformationTransaction routine sets information for a specified transaction.

Parameters

TransactionHandle [in]

A handle to a transaction object that was obtained by a previous call to ZwCreateTransaction or ZwOpenTransaction. The handle must have TRANSACTION_SET_INFORMATION access to the object.

TransactionInformationClass [in]

A TRANSACTION_INFORMATION_CLASS-typed value that specifies the type of information to set. The value must be TransactionPropertiesInformation.

TransactionInformation [in]

A pointer to a caller-allocated buffer that contains the information to set. The buffer's structure type must be TRANSACTION_PROPERTIES_INFORMATION.

TransactionInformationLength [in]

The length, in bytes, of the buffer that the TransactionInformation parameter points to.

Return value

ZwSetInformationTransaction 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 TransactionInformationClass parameter's value is invalid.
STATUS_OBJECT_TYPE_MISMATCH The handle that the TransactionHandle parameter specifies is not a handle to a transaction object.
STATUS_INVALID_HANDLE An object handle is invalid.
STATUS_ACCESS_DENIED The caller does not have appropriate access to the transaction object.
STATUS_INFO_LENGTH_MISMATCH The TransactionInformationLength parameter's value is invalid.
STATUS_INVALID_PARAMETER The contents of the buffer that the TransactionInformation buffer specifies is invalid.

The routine might return other NTSTATUS values.

Remarks

For more information about ZwSetInformationTransaction, see Creating a Transactional Client.

NtSetInformationTransaction and ZwSetInformationTransaction 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

TRANSACTION_INFORMATION_CLASS

TRANSACTION_PROPERTIES_INFORMATION

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransaction

ZwOpenTransaction

ZwQueryInformationTransaction


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

ZwSetInformationTransaction function

Description

The ZwSetInformationTransaction routine sets information for a specified transaction.

Parameters

TransactionHandle [in]

A handle to a transaction object that was obtained by a previous call to ZwCreateTransaction or ZwOpenTransaction. The handle must have TRANSACTION_SET_INFORMATION access to the object.

TransactionInformationClass [in]

A TRANSACTION_INFORMATION_CLASS-typed value that specifies the type of information to set. The value must be TransactionPropertiesInformation.

TransactionInformation [in]

A pointer to a caller-allocated buffer that contains the information to set. The buffer's structure type must be TRANSACTION_PROPERTIES_INFORMATION.

TransactionInformationLength [in]

The length, in bytes, of the buffer that the TransactionInformation parameter points to.

Return value

ZwSetInformationTransaction 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 TransactionInformationClass parameter's value is invalid.
STATUS_OBJECT_TYPE_MISMATCH The handle that the TransactionHandle parameter specifies is not a handle to a transaction object.
STATUS_INVALID_HANDLE An object handle is invalid.
STATUS_ACCESS_DENIED The caller does not have appropriate access to the transaction object.
STATUS_INFO_LENGTH_MISMATCH The TransactionInformationLength parameter's value is invalid.
STATUS_INVALID_PARAMETER The contents of the buffer that the TransactionInformation buffer specifies is invalid.

The routine might return other NTSTATUS values.

Remarks

For more information about ZwSetInformationTransaction, see Creating a Transactional Client.

NtSetInformationTransaction and ZwSetInformationTransaction 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

TRANSACTION_INFORMATION_CLASS

TRANSACTION_PROPERTIES_INFORMATION

Using Nt and Zw Versions of the Native System Services Routines

ZwCreateTransaction

ZwOpenTransaction

ZwQueryInformationTransaction