diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index d1bdc336534..3013fe7eb90 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2196,6 +2196,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; } @@ -3935,6 +3936,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 14d95a47f85..8e3b127b164 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 256e945e6f3..23f03c336d5 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 60396779fc7..db8073ebe3d 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);