C++ 在内核空间中调用NtQuerySystemInformation
我想获取内核空间中的SystemBasicInformation、SystemPerformanceInformation、SystemFileCacheInformation(来自我的非NP驱动程序)。但是我不能在内核空间调用NtQuerySystemInformation,因为它需要用户空间ntdll.lib。C++ 在内核空间中调用NtQuerySystemInformation,c++,c,windows,winapi,driver,C++,C,Windows,Winapi,Driver,我想获取内核空间中的SystemBasicInformation、SystemPerformanceInformation、SystemFileCacheInformation(来自我的非NP驱动程序)。但是我不能在内核空间调用NtQuerySystemInformation,因为它需要用户空间ntdll.lib。 有人知道内核空间中相同的NtQuerySystem信息吗?您正在寻找的可能是 Zw表示它是针对驱动程序的,因此您可以始终使用Zw前缀搜索某些API 另外,为什么您认为ntdll.li
有人知道内核空间中相同的NtQuerySystem信息吗?您正在寻找的可能是
Zw
表示它是针对驱动程序的,因此您可以始终使用Zw
前缀搜索某些API
另外,为什么您认为
ntdll.lib
意味着必须从用户空间调用APINtQuerySystemInformation
也应该可以,你试过了吗,或者只是猜测一下?谢谢你的回答!我尝试使用include ntdll.lib调用ZwQuerySystemInformation,但它不起作用,因为ntdll.lib是用户空间库。在WDK中,ntdll.lib位于/um文件夹中。说明应包含ntdll.lib
以使用ZwQuerySystemInformation
的文档仅适用于用户模式程序。你有没有试着忽略这一点?当然,您通常不需要指定库文件来调用内核模式函数。