Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49088 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 12 ++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 1 + dlls/ntoskrnl.exe/ntoskrnl_private.h | 1 + include/ddk/wdm.h | 3 +++ 4 files changed, 17 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 6ee08f7202..1aa34c9b27 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2145,6 +2145,7 @@ static void *create_process_object( HANDLE handle ) process->header.Type = 3; process->header.WaitListHead.Blink = INVALID_HANDLE_VALUE; /* mark as kernel object */ NtQueryInformationProcess( handle, ProcessBasicInformation, &process->info, sizeof(process->info), NULL ); + IsWow64Process( handle, &process->wow64 ); return process; }
@@ -3884,6 +3885,17 @@ PEPROCESS WINAPI IoGetRequestorProcess(IRP *irp) return irp->Tail.Overlay.Thread->kthread.process; }
+#ifdef _WIN64 +/*********************************************************************** + * IoIs32bitProcess (NTOSKRNL.EXE.@) + */ +BOOLEAN WINAPI IoIs32bitProcess(IRP *irp) +{ + TRACE("irp %p.\n", irp); + return irp->Tail.Overlay.Thread->kthread.process->wow64; +} +#endif + /*********************************************************************** * RtlIsNtDdiVersionAvailable (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 14d95a47f8..8e3b127b16 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -416,6 +416,7 @@ @ stdcall IoInitializeTimer(ptr ptr ptr) @ stdcall IoInvalidateDeviceRelations(ptr long) @ stub IoInvalidateDeviceState +@ stdcall -arch=win64 IoIs32bitProcess(ptr) @ stub IoIsFileOriginRemote @ stub IoIsOperationSynchronous @ stub IoIsSystemThread diff --git a/dlls/ntoskrnl.exe/ntoskrnl_private.h b/dlls/ntoskrnl.exe/ntoskrnl_private.h index 256e945e6f..23f03c336d 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl_private.h +++ b/dlls/ntoskrnl.exe/ntoskrnl_private.h @@ -40,6 +40,7 @@ struct _EPROCESS { DISPATCHER_HEADER header; PROCESS_BASIC_INFORMATION info; + BOOL wow64; };
struct _KTHREAD diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 60396779fc..db8073ebe3 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1608,6 +1608,9 @@ void WINAPI IoGetStackLimits(ULONG_PTR*,ULONG_PTR*); void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR); VOID WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG); void WINAPI IoInvalidateDeviceRelations(PDEVICE_OBJECT,DEVICE_RELATION_TYPE); +#ifdef _WIN64 +BOOLEAN WINAPI IoIs32bitProcess(IRP*); +#endif NTSTATUS WINAPI IoOpenDeviceRegistryKey(DEVICE_OBJECT*,ULONG,ACCESS_MASK,HANDLE*); void WINAPI IoQueueWorkItem(PIO_WORKITEM,PIO_WORKITEM_ROUTINE,WORK_QUEUE_TYPE,void*); NTSTATUS WINAPI IoRegisterDeviceInterface(PDEVICE_OBJECT,const GUID*,PUNICODE_STRING,PUNICODE_STRING);