pub unsafe fn find_first_process_id_by_name(process_name: &str) -> Option<u32>
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);
}