WOW64: Set the software CPU area flag

This is required for wow64.dll to setup the cross-process queue
that is used to pass through e.g. memory unmap events.
This commit is contained in:
Billy Laws committed 2024-11-18 16:18:31 +00:00
1 parent e675f4241a
commit 830bd347c5
4 files changed
+27 -4

No files matched your search

+13
View File
@@ -13,8 +13,11 @@ extern "C" {
#define NtCurrentProcess() ((HANDLE) ~(ULONG_PTR)0)
#define NtCurrentThread() ((HANDLE) ~(ULONG_PTR)1)
#define WOW64_TLS_WOW64INFO 10
#define WOW64_TLS_MAX_NUMBER 19
#define WOW64_CPUFLAGS_SOFTWARE 0x02
#define STATUS_EMULATION_SYSCALL ((NTSTATUS)0x40000039)
#ifdef _M_ARM_64EC
@@ -342,6 +345,16 @@ typedef struct __TEB { /* win32/win64 */
GUID EffectiveContainerId; /* ff0/1828 */
} __TEB, *__PTEB;
typedef struct _WOW64INFO {
ULONG NativeSystemPageSize;
ULONG CpuFlags;
ULONG Wow64ExecuteFlags;
ULONG unknown;
ULONGLONG SectionHandle;
ULONGLONG CrossProcessWorkList;
USHORT NativeMachineType;
USHORT EmulatedMachineType;
} WOW64INFO;
typedef struct _THREAD_BASIC_INFORMATION {
NTSTATUS ExitStatus;