ntoskrnl.exe: Implement IoGetRequestorProcess().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47623
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-08-21 23:16:54 -05:00 committed by Alexandre Julliard
parent 37652d5cc4
commit ca1c153422
4 changed files with 13 additions and 1 deletions

View File

@ -3911,3 +3911,12 @@ ULONG WINAPI ExSetTimerResolution(ULONG time, BOOLEAN set_resolution)
FIXME("stub: %u %d\n", time, set_resolution);
return KeQueryTimeIncrement();
}
/***********************************************************************
* IoGetRequestorProcess (NTOSKRNL.EXE.@)
*/
PEPROCESS WINAPI IoGetRequestorProcess(IRP *irp)
{
TRACE("irp %p.\n", irp);
return irp->Tail.Overlay.Thread->kthread.process;
}

View File

@ -406,7 +406,7 @@
@ stub IoGetInitialStack
@ stub IoGetLowerDeviceObject
@ stdcall IoGetRelatedDeviceObject(ptr)
@ stub IoGetRequestorProcess
@ stdcall IoGetRequestorProcess(ptr)
@ stub IoGetRequestorProcessId
@ stub IoGetRequestorSessionId
@ stdcall IoGetStackLimits(ptr ptr)

View File

@ -225,6 +225,8 @@ static void test_irp_struct(IRP *irp, DEVICE_OBJECT *device)
ok(!irp->UserEvent, "UserEvent = %p\n", irp->UserEvent);
ok(irp->Tail.Overlay.Thread == (PETHREAD)KeGetCurrentThread(),
"IRP thread is not the current thread\n");
ok(IoGetRequestorProcess(irp) == IoGetCurrentProcess(), "processes didn't match\n");
}
static void test_mdl_map(void)

View File

@ -131,6 +131,7 @@ typedef struct _FS_FILTER_CALLBACKS
BOOLEAN WINAPI FsRtlIsNameInExpression(PUNICODE_STRING, PUNICODE_STRING, BOOLEAN, PWCH);
DEVICE_OBJECT * WINAPI IoGetAttachedDevice(DEVICE_OBJECT*);
PEPROCESS WINAPI IoGetRequestorProcess(IRP*);
NTSTATUS WINAPI ObOpenObjectByPointer(void*,ULONG,PACCESS_STATE,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE,HANDLE*);
NTSTATUS WINAPI ObQueryNameString(PVOID,POBJECT_NAME_INFORMATION,ULONG,PULONG);
BOOLEAN WINAPI PsIsSystemThread(PETHREAD);