discord_injector_lib/
lib.rs

1mod asar;
2mod targets;
3mod util;
4pub mod check_installation;
5pub mod inject;
6mod constants;
7pub mod eject;
8
9extern "C" {
10    pub fn find_pid_by_name(process_name: *const u16) -> u32;
11    pub fn get_process_path(pid: u32, path: *mut u16, size: u32) -> bool;
12    pub fn start_process_detached(exe_path: *const u16) -> bool;
13    pub fn terminate_process(pid: u32) -> bool;
14}
15
16
17#[cfg(test)]
18mod tests {
19    use check_installation::check_installed_clients;
20
21    use super::*;
22
23    #[test]
24    fn check_installed_clients_test() {
25        let installed_clients = check_installed_clients().unwrap();
26
27
28        for client in installed_clients {
29            println!("client: {:?}", client);
30        }
31    }
32}