NtQueryInformationResourceManager function (wdm.h)
The ZwQueryInformationResourceManager routine retrieves information about a specified resource manager object.
Syntax
__kernel_entry NTSYSCALLAPI NTSTATUS NtQueryInformationResourceManager(
[in] HANDLE ResourceManagerHandle,
[in] RESOURCEMANAGER_INFORMATION_CLASS ResourceManagerInformationClass,
[out] PVOID ResourceManagerInformation,
[in] ULONG ResourceManagerInformationLength,
[out, optional] PULONG ReturnLength
);
Parameters
[in] ResourceManagerHandle
A handle to a resource manager object that was obtained by a previous call to ZwCreateResourceManager or ZwOpenResourceManager. The handle must have RESOURCEMANAGER_QUERY_INFORMATION access to the object.
[in] ResourceManagerInformationClass
A RESOURCEMANAGER_INFORMATION_CLASS-typed value that specifies the information to retrieve. This value must be ResourceManagerBasicInformation.
[out] ResourceManagerInformation
A pointer to a caller-allocated RESOURCEMANAGER_BASIC_INFORMATION structure that receives information from ZwQueryInformationResourceManager.
[in] ResourceManagerInformationLength
The length, in bytes, of the buffer that the ResourceManagerInformation 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 ResourceManagerInformation buffer. This parameter is optional and can be NULL.
Return value
ZwQueryInformationResourceManager 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 a resource manager object. |
|
An object handle is invalid. |
|
The ResourceManagerInformationClass parameter's value is invalid. |
|
The buffer size that the ResourceManagerInformationLength parameter specifies is smaller than the RESOURCEMANAGER_BASIC_INFORMATION structure. |
|
The buffer size that the ResourceManagerInformationLength parameter specifies is too small to receive all the variable-length information that is available. |
|
The caller does not have appropriate access to the resource manager object. |
The routine might return other NTSTATUS values.
Remarks
For more information about the ZwQueryInformationResourceManager routine, see Creating a Resource Manager.
NtQueryInformationResourceManager and ZwQueryInformationResourceManager 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
RESOURCEMANAGER_BASIC_INFORMATION
RESOURCEMANAGER_INFORMATION_CLASS
Using Nt and Zw Versions of the Native System Services Routines