Expand description

tasklist

tasklist-rs

tasklist is a crate let you easily get tasklist and process information on windows. it based on windows-rs crate.

what information you can get
  1. process name,pid,parrentID,theradsID.
  2. process start_time,exit_time,kernel_time,user_time.
  3. process path and commandline params.
  4. process SID and Domain/User.
  5. TODO process IO infomation
  6. TODO process memory information
  7. TODO process handles information
  8. tasklist(all process)

remember some infomation need higher privilege in some specific windows versions

example

use tasklist;
fn main(){
    unsafe{
        let tl = tasklist::Tasklist::new();
        for i in tl{
            println!("{} {} {}",i.get_pid(),i.get_pname(),i.get_user());
        }
    }
}

Modules

Structs

the process struct .

this struct is Process Iterator.

Functions

enbale the debug privilege for your program , it return a bool to show if it success.

return the first process id by the name you gave , it return the Option<u32> , u32 is the process id.

find the process id by the name you gave , it return a Vec<U32> , if the process is not exist , it will return a empty Vec<u32>

just like the name , this function will return a Option<String> by the id you gave, String is the name of process.

kill a process by process_id . if success , it will return true

get the windows tasklist ,return a HashMap<String,u32> String is the name of process, and u32 is the id of process