Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/139.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在内核空间中调用NtQuerySystemInformation_C++_C_Windows_Winapi_Driver - Fatal编程技术网

C++ 在内核空间中调用NtQuerySystemInformation

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

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

您正在寻找的可能是

Zw
表示它是针对驱动程序的,因此您可以始终使用
Zw
前缀搜索某些API


另外,为什么您认为
ntdll.lib
意味着必须从用户空间调用API
NtQuerySystemInformation
也应该可以,你试过了吗,或者只是猜测一下?

谢谢你的回答!我尝试使用include ntdll.lib调用ZwQuerySystemInformation,但它不起作用,因为ntdll.lib是用户空间库。在WDK中,ntdll.lib位于/um文件夹中。说明应包含
ntdll.lib
以使用
ZwQuerySystemInformation
的文档仅适用于用户模式程序。你有没有试着忽略这一点?当然,您通常不需要指定库文件来调用内核模式函数。