Commit 2f7e7863 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Implement PsGetThreadProcessId.

parent c4832019
......@@ -2688,6 +2688,15 @@ HANDLE WINAPI PsGetThreadId(PETHREAD thread)
return thread->kthread.id.UniqueThread;
}
/*********************************************************************
* PsGetThreadProcessId (NTOSKRNL.@)
*/
HANDLE WINAPI PsGetThreadProcessId( PETHREAD thread )
{
TRACE( "%p -> %p\n", thread, thread->kthread.id.UniqueProcess );
return thread->kthread.id.UniqueProcess;
}
/***********************************************************************
* KeInsertQueue (NTOSKRNL.EXE.@)
*/
......
......@@ -902,7 +902,7 @@
@ stub PsGetThreadHardErrorsAreDisabled
@ stdcall PsGetThreadId(ptr)
@ stub PsGetThreadProcess
@ stub PsGetThreadProcessId
@ stdcall PsGetThreadProcessId(ptr)
@ stub PsGetThreadSessionId
@ stub PsGetThreadTeb
@ stub PsGetThreadWin32Thread
......
......@@ -346,6 +346,7 @@ static void test_current_thread(BOOL is_system)
ok(current != *pPsInitialSystemProcess, "current == PsInitialSystemProcess\n");
ok(PsGetProcessId(current) == PsGetCurrentProcessId(), "process IDs don't match\n");
ok(PsGetThreadProcessId((PETHREAD)KeGetCurrentThread()) == PsGetCurrentProcessId(), "process IDs don't match\n");
thread = PsGetCurrentThread();
ret = wait_single( thread, 0 );
......
......@@ -221,6 +221,7 @@ void WINAPI KeSetTargetProcessorDpc(PRKDPC,CCHAR);
BOOLEAN WINAPI MmIsAddressValid(void *);
HANDLE WINAPI PsGetProcessId(PEPROCESS);
HANDLE WINAPI PsGetThreadId(PETHREAD);
HANDLE WINAPI PsGetThreadProcessId(PETHREAD);
NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine(PCREATE_PROCESS_NOTIFY_ROUTINE,BOOLEAN);
NTSTATUS WINAPI PsSetCreateProcessNotifyRoutineEx(PCREATE_PROCESS_NOTIFY_ROUTINE_EX,BOOLEAN);
NTSTATUS WINAPI PsSetCreateThreadNotifyRoutine(PCREATE_THREAD_NOTIFY_ROUTINE);
......
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