Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ZwQueryInformationEnlistment routine

The ZwQueryInformationEnlistment routine retrieves information about a specified enlistment object.

Syntax


NTSTATUS ZwQueryInformationEnlistment(
  _In_      HANDLE                       EnlistmentHandle,
  _In_      ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass,
  _Out_     PVOID                        EnlistmentInformation,
  _In_      ULONG                        EnlistmentInformationLength,
  _Out_opt_ PULONG                       ReturnLength
);

Parameters

EnlistmentHandle [in]

A handle to an enlistment object that was obtained by a previous call to ZwCreateEnlistment or ZwOpenEnlistment. The handle must have ENLISTMENT_QUERY_INFORMATION access to the object.

EnlistmentInformationClass [in]

An ENLISTMENT_INFORMATION_CLASS-typed enumeration value that specifies the information to be obtained. This value must be one of the following values:

  • EnlistmentBasicInformation

  • EnlistmentRecoveryInformation

The enumeration's EnlistmentFullInformation value is not used with ZwQueryInformationEnlistment.

EnlistmentInformation [out]

A pointer to a caller-allocated buffer that receives the information that the EnlistmentInformationClass parameter specifies. If the EnlistmentInformationClass parameter's value is EnlistmentBasicInformation, this buffer's structure type must be ENLISTMENT_BASIC_INFORMATION. If the EnlistmentInformationClass parameter's value is EnlistmentRecoveryInformation, this buffer's type must match the caller-defined type that the caller used when it called ZwSetInformationEnlistment.

EnlistmentInformationLength [in]

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

ReturnLength [out, optional]

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

Return value

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

Return codeDescription
STATUS_OBJECT_TYPE_MISMATCH

The specified handle is not a handle to an enlistment object.

STATUS_INVALID_HANDLE

The object handle is invalid.

STATUS_INVALID_INFO_CLASS

The EnlistmentInformationClass parameter's value is invalid.

STATUS_INFO_LENGTH_MISMATCH

The EnlistmentInformationLength parameter's value is invalid.

STATUS_ACCESS_DENIED

The caller does not have appropriate access to the enlistment object.

 

The routine might return other NTSTATUS values.

Remarks

A resource manager can call ZwSetInformationEnlistment to set enlistment-specific recovery information for an enlistment object and then call ZwQueryInformationEnlistment to retrieve the recovery information.

For more information about ZwQueryInformationEnlistment, see Handling Recovery Operations.

Callers of ZwQueryInformationEnlistment must be running at IRQL = PASSIVE_LEVEL.

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

ENLISTMENT_BASIC_INFORMATION
ENLISTMENT_INFORMATION_CLASS
ZwCreateEnlistment
ZwOpenEnlistment
ZwSetInformationEnlistment

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft