fn find_fm_pid() -> process_memory::Pid
{
    let mut system = sysinfo::System::new_all();
    // First we update all information of our system struct.
    system.refresh_all();

    let mut fmpid : process_memory::Pid = 0;
    // Now let's print every process' id and name:
    for (pid, proc_) in system.get_processes() {
        if proc_.name() == FM_PROCESS_NAME
        {
            fmpid = *pid as u32;
        }
    }
    fmpid
}
/* Find the PID for the fm.exe process */
Find the PID for the fm.exe process
Find the PID for the fm . exe process
fn find_fm_pid() -> process_memory::Pid
{
    let mut system = sysinfo::System::new_all();
    // First we update all information of our system struct.
    system.refresh_all();
    let mut fmpid : process_memory::Pid = 0;
    // Now let's print every process' id and name:
    for (pid, proc_) in system.get_processes() {
        if proc_.name() == FM_PROCESS_NAME
        {
            fmpid = *pid as u32;
        }
    }
    fmpid
}
fn find_fm_pid ( ) -> process_memory :: Pid { let mut system = sysinfo :: System :: new_all ( ) ; // First we update all information of our system struct. system . refresh_all ( ) ; let mut fmpid : process_memory :: Pid = 0 ; // Now let's print every process' id and name: for ( pid , proc_ ) in system . get_processes ( ) { if proc_ . name ( ) == FM_PROCESS_NAME { fmpid = * pid as u32 ; } } fmpid }
Find the PID for the fm.exe process
Find the PID for the fm . exe process