Commit ca1c1534 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement IoGetRequestorProcess().

parent 37652d5c
......@@ -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;
}
......@@ -406,7 +406,7 @@
@ stub IoGetInitialStack
@ stub IoGetLowerDeviceObject
@ stdcall IoGetRelatedDeviceObject(ptr)
@ stub IoGetRequestorProcess
@ stdcall IoGetRequestorProcess(ptr)
@ stub IoGetRequestorProcessId
@ stub IoGetRequestorSessionId
@ stdcall IoGetStackLimits(ptr ptr)
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment