Kernel32GetProcessId Method
Retrieves the process identifier (PID) of the specified process handle.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static int GetProcessId(
IntPtr handle
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function GetProcessId (
handle As IntPtr
) As Integer
Dim handle As IntPtr
Dim returnValue As Integer
returnValue = Kernel32.GetProcessId(handle)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static int GetProcessId(
IntPtr handle
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member GetProcessId :
handle : IntPtr -> int
No code example is currently available or this language may not be supported.
- handle IntPtr
-
A handle to the process.
The handle must have the QueryInformation
or QueryLimitedInformation access right.
Int32
The process identifier (PID).