4 instantiations of SafeProcessHandle
System (4)
compmod\microsoft\win32\safehandles\SafeProcessHandle.cs (1)
30
internal static SafeProcessHandle InvalidHandle = new
SafeProcessHandle
(IntPtr.Zero);
compmod\system\codedom\compiler\Executor.cs (1)
158
SafeProcessHandle procSH = new
SafeProcessHandle
();
services\monitoring\system\diagnosticts\Process.cs (2)
1997
SafeProcessHandle procSH = new
SafeProcessHandle
();
2278
SafeProcessHandle handle = new
SafeProcessHandle
(shellExecuteInfo.hProcess);
64 references to SafeProcessHandle
System (64)
compmod\microsoft\win32\NativeMethods.cs (18)
169
public static extern bool GetExitCodeProcess(
SafeProcessHandle
processHandle, out int exitCode);
173
public static extern bool GetProcessTimes(
SafeProcessHandle
handle, out long creation, out long exit, out long kernel, out long user);
206
public static extern bool TerminateProcess(
SafeProcessHandle
processHandle, int exitCode);
1194
public static extern int WaitForInputIdle(
SafeProcessHandle
handle, int milliseconds);
1198
public static extern
SafeProcessHandle
OpenProcess(int access, bool inherit, int processId);
1202
public static extern bool EnumProcessModules(
SafeProcessHandle
handle, IntPtr modules, int size, ref int needed);
1215
public static extern bool GetModuleInformation(
SafeProcessHandle
processHandle, HandleRef moduleHandle, NtModuleInfo ntModuleInfo, int size);
1218
public static extern int GetModuleBaseName(
SafeProcessHandle
processHandle, HandleRef moduleHandle, StringBuilder baseName, int size);
1221
public static extern int GetModuleFileNameEx(
SafeProcessHandle
processHandle, HandleRef moduleHandle, StringBuilder baseName, int size);
1225
public static extern bool SetProcessWorkingSetSize(
SafeProcessHandle
handle, IntPtr min, IntPtr max);
1228
public static extern bool GetProcessWorkingSetSize(
SafeProcessHandle
handle, out IntPtr min, out IntPtr max);
1231
public static extern bool SetProcessAffinityMask(
SafeProcessHandle
handle, IntPtr mask);
1234
public static extern bool GetProcessAffinityMask(
SafeProcessHandle
handle, out IntPtr processMask, out IntPtr systemMask);
1243
public static extern bool GetProcessPriorityBoost(
SafeProcessHandle
handle, out bool disabled);
1246
public static extern bool SetProcessPriorityBoost(
SafeProcessHandle
handle, bool disabled);
1286
public static extern int GetPriorityClass(
SafeProcessHandle
handle);
1289
public static extern bool SetPriorityClass(
SafeProcessHandle
handle, int priorityClass);
1301
public static extern int NtQueryInformationProcess(
SafeProcessHandle
processHandle, int query, NtProcessBasicInfo info, int size, int[] returnedSize);
compmod\microsoft\win32\safehandles\SafeProcessHandle.cs (2)
30
internal static
SafeProcessHandle
InvalidHandle = new SafeProcessHandle(IntPtr.Zero);
47
internal static extern
SafeProcessHandle
OpenProcess(int access, bool inherit, int processId);
compmod\microsoft\win32\SafeNativeMethods.cs (1)
193
public static extern bool IsWow64Process(
SafeProcessHandle
hProcess, ref bool Wow64Process);
compmod\system\codedom\compiler\Executor.cs (1)
158
SafeProcessHandle
procSH = new SafeProcessHandle();
services\monitoring\system\diagnosticts\Process.cs (25)
52
SafeProcessHandle
m_processHandle;
227
SafeProcessHandle
handle = null;
294
SafeProcessHandle
handle = null;
360
public
SafeProcessHandle
SafeHandle {
728
SafeProcessHandle
handle = null;
746
SafeProcessHandle
handle = null;
770
SafeProcessHandle
handle = null;
799
SafeProcessHandle
handle = null;
901
SafeProcessHandle
handle = null;
920
SafeProcessHandle
handle = null;
1255
void ReleaseProcessHandle(
SafeProcessHandle
handle) {
1433
SafeProcessHandle
handle = null;
1651
SafeProcessHandle
GetProcessHandle(int access, bool throwIfExited) {
1684
SafeProcessHandle
handle =
SafeProcessHandle
.InvalidHandle;
1716
SafeProcessHandle
GetProcessHandle(int access) {
1725
SafeProcessHandle
OpenProcessHandle() {
1729
SafeProcessHandle
OpenProcessHandle(Int32 access) {
1786
void SetProcessHandle(
SafeProcessHandle
processHandle) {
1815
SafeProcessHandle
handle = null;
1997
SafeProcessHandle
procSH = new SafeProcessHandle();
2278
SafeProcessHandle
handle = new SafeProcessHandle(shellExecuteInfo.hProcess);
2367
SafeProcessHandle
handle = null;
2427
SafeProcessHandle
handle = null;
2494
SafeProcessHandle
handle = null;
services\monitoring\system\diagnosticts\ProcessManager.cs (10)
238
public static int GetProcessIdFromHandle(
SafeProcessHandle
processHandle) {
263
public static
SafeProcessHandle
OpenProcess(int processId, int access, bool throwIfExited) {
264
SafeProcessHandle
processHandle = NativeMethods.OpenProcess(access, false, processId);
280
return
SafeProcessHandle
.InvalidHandle;
577
SafeProcessHandle
processHandle =
SafeProcessHandle
.InvalidHandle;
611
SafeProcessHandle
hCurProcess =
SafeProcessHandle
.InvalidHandle;
632
if (hCurProcess !=
SafeProcessHandle
.InvalidHandle) {
735
public static int GetProcessIdFromHandle(
SafeProcessHandle
processHandle) {
services\monitoring\system\diagnosticts\processwaithandle.cs (1)
13
internal ProcessWaitHandle(
SafeProcessHandle
processHandle): base() {
services\monitoring\system\diagnosticts\SharedPerformanceCounter.cs (6)
60
using (
SafeProcessHandle
procHandle =
SafeProcessHandle
.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION, false, pid)) {
1212
using (
SafeProcessHandle
procHandle =
SafeProcessHandle
.OpenProcess(NativeMethods.PROCESS_QUERY_INFORMATION, false, pid)) {
1239
using (
SafeProcessHandle
procHandle =
SafeProcessHandle
.OpenProcess(NativeMethods.SYNCHRONIZE, false, pid)) {