Function tasklist::find_first_process_id_by_name
source · [−]Expand description
return the first process id by the name you gave , it return the Option<u32>
, u32
is the process id.
unsafe{
let pid = tasklist::find_first_process_id_by_name("cmd.exe");
println!("{:#?}",pid);
}