use xll_utils::exports::verify_dll_exports;
const EXPECTED_EXPORTS: &[&str] = &[
"xlAutoOpen",
"xlAutoClose",
"xlAutoFree12",
"xlAddInManagerInfo12",
];
fn main() -> Result<(), Box<dyn std::error::Error>> {
let dll_path = std::env::args()
.nth(1)
.unwrap_or_else(|| {
eprintln!("Usage: verify_exports <path-to-dll>");
std::process::exit(1);
});
let report = verify_dll_exports(&dll_path, EXPECTED_EXPORTS)?;
println!("Verification: {}", report.dll_path.display());
println!(" Architecture: {}", report.architecture);
println!(" Total exports: {}", report.total_exports);
println!(
" Found: {} / {}",
report.found.len(),
EXPECTED_EXPORTS.len()
);
if !report.missing.is_empty() {
println!(" Missing:");
for name in &report.missing {
println!(" - {name}");
}
}
if !report.unexpected.is_empty() {
println!(" Unexpected:");
for name in &report.unexpected {
println!(" - {name}");
}
}
if report.complete {
println!(" Result: OK");
} else {
println!(" Result: FAILED");
std::process::exit(1);
}
Ok(())
}