Commit ae6ae91d authored by Derek Lesho's avatar Derek Lesho Committed by Alexandre Julliard

ntoskrnl.exe: Implement PsLookupProcessByProcessId.

parent e5bbb5e6
......@@ -2482,6 +2482,25 @@ PEPROCESS WINAPI IoGetCurrentProcess(void)
return NULL;
}
/***********************************************************************
* PsLookupProcessByProcessId (NTOSKRNL.EXE.@)
*/
NTSTATUS WINAPI PsLookupProcessByProcessId( HANDLE processid, PEPROCESS *process )
{
NTSTATUS status;
HANDLE handle;
TRACE( "(%p %p)\n", processid, process );
if (!(handle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, HandleToUlong(processid) )))
return STATUS_INVALID_PARAMETER;
status = ObReferenceObjectByHandle( handle, PROCESS_ALL_ACCESS, PsProcessType, KernelMode, (void**)process, NULL );
NtClose( handle );
return status;
}
static void *create_thread_object( HANDLE handle )
{
......@@ -3255,17 +3274,6 @@ NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE routine)
}
/*****************************************************
* PsLookupProcessByProcessId (NTOSKRNL.EXE.@)
*/
NTSTATUS WINAPI PsLookupProcessByProcessId(HANDLE processid, PEPROCESS *process)
{
static int once;
if (!once++) FIXME("(%p %p) stub\n", processid, process);
return STATUS_NOT_IMPLEMENTED;
}
/*****************************************************
* IoSetThreadHardErrorMode (NTOSKRNL.EXE.@)
*/
BOOLEAN WINAPI IoSetThreadHardErrorMode(BOOLEAN EnableHardErrors)
......
......@@ -131,6 +131,7 @@ typedef struct _FS_FILTER_CALLBACKS
BOOLEAN WINAPI FsRtlIsNameInExpression(PUNICODE_STRING, PUNICODE_STRING, BOOLEAN, PWCH);
NTSTATUS WINAPI ObQueryNameString(PVOID,POBJECT_NAME_INFORMATION,ULONG,PULONG);
NTSTATUS WINAPI PsLookupProcessByProcessId(HANDLE,PEPROCESS*);
NTSTATUS WINAPI PsLookupThreadByThreadId(HANDLE,PETHREAD*);
void WINAPI PsRevertToSelf(void);
......
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