Hello All,
I'm trying to get this simple code to work ...
extern "C" {
#include <ntddk.h>
#include <wdm.h>
}
[...]
void EnumProcesses() {
ULONG size;
ZwQuerySystemInformation(SystemProcessInformation, nullptr, 0, &size);
size += 1 << 12;
auto buffer = ExAllocatePool2(POOL_FLAG_PAGED, size, 'cprP');
if (!buffer)
return;
[...]
TIA, prokash
Build started...
1>------ Build started: Project: EnumProc, Configuration: Debug x64 ------
1>Building 'EnumProc' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform.
1>EnumProc.cpp
1>F:\windowskernelprogrammingbook2e\Chapter08\EnumProc\EnumProc.cpp(50,35): error C2065: 'POOL_FLAG_PAGED': undeclared identifier
1>F:\windowskernelprogrammingbook2e\Chapter08\EnumProc\EnumProc.cpp(50,19): error C3861: 'ExAllocatePool2': identifier not found
1>Done building project "EnumProc.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========