Beispiel #1
0
 internal static extern IntPtr OpenProcess(
     [In] Enumerations.ProcessAccess desiredAccess,
     [In][MarshalAs(UnmanagedType.Bool)] bool inheritHandle,
     [In] int processId);
 // Opens an existing local process object. This method assumes you do not wish to inherit the specified process's handle.
 public static IntPtr OpenProcess(int processId, Enumerations.ProcessAccess desiredAccess)
 {
     return(UnsafeNativeMethods.OpenProcess(desiredAccess, false, processId));
 }