Ejemplo n.º 1
0
        internal static SafeProcessHandle OpenProcess(Process proc, PROCESS_RIGHTS processRights)
        {
            var hProcess   = Win32.OpenProcess((int)PROCESS_RIGHTS.PROCESS_ALL_ACCESS, false, proc.Id);
            int win32Error = Marshal.GetLastWin32Error();

            if (hProcess.IsInvalid)
            {
                throw new Win32Exception(win32Error, "Couldn't open the process.");
            }
            return(hProcess);
        }
Ejemplo n.º 2
0
 public static extern IntPtr OpenProcess(PROCESS_RIGHTS dwDesiredAccess, bool bInheritHandle, int dwProcessId);
Ejemplo n.º 3
0
 public static extern int OpenProcess(PROCESS_RIGHTS DesiredAccess, int InheritHandle, int ProcessId);
Ejemplo n.º 4
0
 public static extern int OpenProcess(PROCESS_RIGHTS DesiredAccess, int InheritHandle, int ProcessId);
Ejemplo n.º 5
0
 OpenProcess(PROCESS_RIGHTS dwDesiredAccess, bool bInheritHandle, int
             dwProcessId);
Ejemplo n.º 6
0
 public static extern int OpenProcess(PROCESS_RIGHTS dwDesiredAccess, bool bInheritHandle, int
     dwProcessId);