ZwQueryInformationTransaction routine

The ZwQueryInformationTransaction routine retrieves information about a specified transaction.

Syntax


NTSTATUS ZwQueryInformationTransaction(
  _In_      HANDLE                        TransactionHandle,
  _In_      TRANSACTION_INFORMATION_CLASS TransactionInformationClass,
  _Out_     PVOID                         TransactionInformation,
  _In_      ULONG                         TransactionInformationLength,
  _Out_opt_ PULONG                        ReturnLength
);

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

TransactionInformationClass [in]

A TRANSACTION_INFORMATION_CLASS-typed value that specifies the information to obtain. The value must be one of the following values:

  • TransactionBasicInformation

  • TransactionPropertiesInformation

  • TransactionEnlistmentInformation

The TransactionFullInformation value is not used with ZwQueryInformationTransaction.

TransactionInformation [out]

A pointer to a caller-allocated buffer that receives the information that the TransactionInformationClass parameter specifies. The buffer's structure type must be TRANSACTION_BASIC_INFORMATION, TRANSACTION_PROPERTIES_INFORMATION, or TRANSACTION_ENLISTMENTS_INFORMATION.

TransactionInformationLength [in]

The length, in bytes, of the buffer that the TransactionInformation 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 TransactionInformation buffer. This parameter is optional and can be NULL.

Return value

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

Return codeDescription
STATUS_INVALID_INFO_CLASS

The TransactionInformationClass parameter's value is invalid.

STATUS_INFO_LENGTH_MISMATCH

The length of the buffer that is specified by the TransactionInformationLength parameter is incorrect.

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_BUFFER_OVERFLOW

The buffer that the TransactionInformation parameter specifies is too small.

 

The routine might return other NTSTATUS values.

Remarks

For more information about how to use ZwQueryInformationTransaction, see Creating a Transactional Client.

Requirements

Target platform

Universal

Version

Available in Windows Vista and later operating system versions.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

DDI compliance rules

PowerIrpDDis, HwStorPortProhibitedDDIs

See also

TmGetTransactionId
TRANSACTION_BASIC_INFORMATION
TRANSACTION_ENLISTMENTS_INFORMATION
TRANSACTION_INFORMATION_CLASS
TRANSACTION_PROPERTIES_INFORMATION
ZwCreateTransaction
ZwOpenTransaction
ZwSetInformationTransaction

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft