error C2061: syntax error: identifier 'QUEUE_USER_APC_FLAGS'
mrexodia opened this issue · comments
Duncan Ogilvie commented
The latest version doesn't work when you do:
#include <phnt_windows.h>
#include <phnt.h>
Because of:
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwQueueApcThreadEx2(
_In_ HANDLE ThreadHandle,
_In_opt_ HANDLE ReserveHandle, // NtAllocateReserveObject
_In_ QUEUE_USER_APC_FLAGS ApcFlags, // <== errors here
_In_ PPS_APC_ROUTINE ApcRoutine,
_In_opt_ PVOID ApcArgument1,
_In_opt_ PVOID ApcArgument2,
_In_opt_ PVOID ApcArgument3
);
This API should probably be guarded by a Windows 11 check?
dmex commented
diversenok commented
I see. Looks like you're using an older SDK (10.0.19041 or below) that doesn't include QUEUE_USER_APC_FLAGS
. I'll update the fallback definition in phnt shortly. Until then, you can use a workaround:
#define PHNT_VERSION PHNT_WIN11
#include <phnt_windows.h>
#include <phnt.h>
Duncan Ogilvie commented
Yeah I would expect the headers to work with the SDK version for the PHNT_VERSION you use. For now I switched to an older version and that seems to work!
Duncan Ogilvie commented
Seems to be fixed by 0fc01f1, thanks!