loadpe-rs/src/bin/main.rs

18 lines
434 B
Rust

use loadpe_rs::load_exe;
#[cfg(target_arch = "x86_64")]
const EXE_PATH: &str = r#"E:\work\rust\loadpe-rs\tests\Testx64.exe"#;
#[cfg(target_arch = "x86")]
const EXE_PATH: &str = r#"E:\work\rust\loadpe-rs\tests\Testx32.exe"#;
fn main() {
match load_exe(EXE_PATH, None) {
Ok(_) => {
println!("Load exe success!");
}
Err(e) => {
eprintln!("Load exe failed: {}", e);
}
}
}