I'm writing Windows kernel driver with Visual Studio 2017 as a C++ project. I've included "ntifs.h"
that covers most definitions that weren't included in "ntddk.h"
.
Then, as a quick example, say, I want to call NtQuerySystemInformation
function, but the definition of SYSTEM_INFORMATION_CLASS
is missing. That page suggests including winternl.h
. But when I do:
#include <winternl.h>
It doesn't find it:
fatal error C1083: Cannot open include file: 'winternl.h': No such file or directory
So even if I provide a path for it, I then get a bunch of errors from winternl.h
, ntdef.h
, etc. about struct redefinitions.
Any idea how to include all those definitions from the winternl.h
into a kernel driver project?