#ifndef _NTPSAPI_H
// Threads
#if (PHNT_MODE != PHNT_MODE_KERNEL)
#define Wow64EncodeApcRoutine(ApcRoutine) \
((PVOID)((0 - ((LONG_PTR)(ApcRoutine))) << 2))
View code on GitHubThis macro encodes the function pointer and indicates to NtQueueApcThread, NtQueueApcThreadEx, or NtQueueApcThreadEx2 that the APC should be executed in the WoW64 mode.
To decode the pointer back, use Wow64DecodeApcRoutine.