PsGetProcessId routine
The PsGetProcessId routine returns the process identifier (process ID) that is associated with a specified process.
Syntax
HANDLE PsGetProcessId( _In_ PEPROCESS Process );
Parameters
- Process [in]
-
A pointer to a process object structure.
Return value
PsGetProcessId returns the process ID of the process that the Process parameter specifies.
Remarks
The EPROCESS-typed process object structure is an opaque data structure that the operating system uses internally. To obtain a pointer to the EPROCESS structure for the current process, a driver can call PsGetCurrentProcess. To obtain a pointer to the EPROCESS structure for a different process, the driver can call ObReferenceObjectByHandle.
Requirements
|
Version | Available in Windows XP and later versions of Windows. |
|---|---|
|
Header |
|
|
Library |
|
|
IRQL | Any level |
See also
Send comments about this topic to Microsoft
Build date: 5/22/2013