// ntddk.h
HANDLE PsGetThreadProcessId(
PETHREAD Thread
);
View the official Windows Driver Kit DDI referenceNo description available.
The PsGetThreadProcessId routine returns the process identifier (process ID) that is associated with a specified thread's process.
ThreadA pointer to an executive thread object structure.
The supplied thread's process's process ID.