// ntddk.h
HANDLE PsGetCurrentProcessId();
View the official Windows Driver Kit DDI reference
No description available.
The PsGetCurrentProcessId routine identifies the current thread's process.
PsGetCurrentProcessId returns the process ID of the process that created the current thread.
PsGetCurrentProcessId returns the process ID of the process that originally created the current thread, which is not necessarily the process that the thread is currently attached to. In scenarios where a thread may be attached to a different process context (via APC state), this can differ from PsGetProcessId(PsGetCurrentProcess())
.
Use PsGetCurrentProcessId when you need the ID of the process that owns the thread. Use PsGetProcessId(PsGetCurrentProcess()) when you need the ID of the process context the thread is currently operating in.
PsSetCreateProcessNotifyRoutine
PsSetCreateThreadNotifyRoutine