fn main() { let pid: u32 = std::env::args() .nth(1) .map(|s| s.parse().unwrap_or(0)) .unwrap_or(0); if pid == 0 { println!("usage: cargo run --example injector -- "); return; } let handle = djin::open_process(pid).unwrap(); #[cfg(target_pointer_width = "32")] let dll = "examples/my_library.dll"; #[cfg(target_pointer_width = "64")] let dll = "examples/my_library_64.dll"; println!("{:?}", djin::inject_dll(handle, dll, b"my_library_init")); }