GetProcessId (kernel32)
Last changed: -186.136.223.176

.
Summary
Retrieves the process identifier of the process associated with the specified thread (handle).

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
public static extern uint GetProcessIdOfThread(IntPtr handle);

VB Signature:

Declare Function GetProcessIdOfThread Lib "kernel32" (ByVal Thread As IntPtr) As UInt32

Boo Signature:

[DllImport("kernel32.dll", SetLastError : true)]
def GetProcessId(hProcess as IntPtr) as UInt32:
     pass

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

To use with an handle to a thread kernel object. (Possibly obtained by NtQuerySystemInformation with SYSTEM_INFORMATION_CLASS.SystemHandleInformation)

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation