ntoskrnl.exe: Implement PsLookupProcessByProcessId.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e5bbb5e6ca
commit
ae6ae91d1a
|
@ -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 )
|
||||
{
|
||||
|
@ -3254,17 +3273,6 @@ NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE routine)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* 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.@)
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue