NtQueryInformationEnlistment function (wdm.h)
The ZwQueryInformationEnlistment routine retrieves information about a specified enlistment object.
Syntax
__kernel_entry NTSYSCALLAPI NTSTATUS NtQueryInformationEnlistment(
[in] HANDLE EnlistmentHandle,
[in] ENLISTMENT_INFORMATION_CLASS EnlistmentInformationClass,
[out] PVOID EnlistmentInformation,
[in] ULONG EnlistmentInformationLength,
[out, optional] PULONG ReturnLength
);
Parameters
[in] EnlistmentHandle
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.
[in] EnlistmentInformationClass
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
[out] EnlistmentInformation
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.
[in] EnlistmentInformationLength
The length, in bytes, of the buffer that the EnlistmentInformation parameter points to.
[out, optional] ReturnLength
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 code | Description |
---|---|
|
The specified handle is not a handle to an enlistment object. |
|
The object handle is invalid. |
|
The EnlistmentInformationClass parameter's value is invalid. |
|
The EnlistmentInformationLength parameter's value is invalid. |
|
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.
NtQueryInformationEnlistment and ZwQueryInformationEnlistment are two versions of the same Windows Native System Services routine.
For calls from kernel-mode drivers, the NtXxx and ZwXxx 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 NtXxx and ZwXxx versions of a routine, see Using Nt and Zw Versions of the Native System Services Routines.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later operating system versions. |
Target Platform | Universal |
Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | HwStorPortProhibitedDDIs, PowerIrpDDis |
See also
Using Nt and Zw Versions of the Native System Services Routines