[DllImport("kernel32.dll")]
static extern IntPtr OpenProcess(ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
<DllImport("kernel32.dll")> _
Private Shared Function OpenProcess(ByVal dwDesiredAccess As ProcessAccessFlags, <MarshalAs(UnmanagedType.Bool)> ByVal bInheritHandle As Boolean, ByVal dwProcessId As Integer) As IntPtr
End Function
[DllImport("kernel32")]
static def OpenProcess(dwDesiredAccess as ProcessAccess, bInheritHandle as bool, dwProcessId as int) as IntPtr:
pass
None.
Please add some!
' Get the handle of a running process
Dim curProcess As Process = Process.GetCurrentProcess()
hProcess = OpenProcess(PROCESS_ACCESS.PROCESS_QUERY_INFORMATION, True, curProcess.Id)
Do you know one? Please contribute it!