Skip to main content

open_process

Function open_process 

Source
pub fn open_process(
    desired_access: u32,
    inherit_handle: i32,
    process_id: u32,
) -> HANDLE
Expand description

Opens a HANDLE to a process.

If the function fails, it will return a null HANDLE.

§Examples

let pid = 792u32;
let handle = dyncvoke_core::open_process(0x0040, 0, pid); //PROCESS_DUP_HANDLE access right.

if !handle.is_null()
{
    println!("Handle to process with id {} with PROCESS_DUP_HANDLE access right successfully obtained.", pid);
}