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