Method OpenProcess
OpenProcess(uint, bool, uint)
Opens an existing process object and returns a handle that can be used to access the process.
public static extern nint OpenProcess(uint dwDesiredAccess, bool bInheritHandle, uint dwProcessId)
Parameters
dwDesiredAccessuintThe access level requested for the process handle.
bInheritHandleboolIf true, processes created by this process will inherit the handle.
dwProcessIduintThe identifier of the local process to be opened.