#![windows_subsystem = "windows"] #[link(name = "user32")] extern "system" { fn MessageBoxW(window: *mut std::ffi::c_void, text: *const u16, caption: *const u16, kind: u32) -> i32; } fn main() { let title: Vec = option_env!("FIXTURE_NAME").unwrap_or("MSIX fixture").encode_utf16().chain(Some(0)).collect(); let text: Vec = "This is a packaging test application.".encode_utf16().chain(Some(0)).collect(); unsafe { MessageBoxW(std::ptr::null_mut(), text.as_ptr(), title.as_ptr(), 0); } }