gpt4 book ai didi

c++ - 在内核空间调用 NtQuerySystemInformation

转载 作者:太空宇宙 更新时间:2023-11-04 08:45:02 26 4
gpt4 key购买 nike

我想获取内核空间中的 SystemBasicInformation、SystemPerformanceInformation、SystemFileCacheInformation(来 self 的非 PnP 驱动程序)。但是我不能在内核空间调用 NtQuerySystemInformation,因为它需要用户空间的 ntdll.lib。有人知道内核空间中的相同 NtQuerySystemInformation 吗?

最佳答案

您正在寻找的可能是 ZwQuerySystemInformation

Zw 表示它是针对驱动程序的,因此您可以随时 google 一些带有 Zw 前缀的 API。

另外,为什么您认为 ntdll.lib 意味着必须从用户空间调用 API? NtQuerySystemInformation 应该也能正常工作,您试过了吗,还是只是猜测?

关于c++ - 在内核空间调用 NtQuerySystemInformation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22025866/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com