Files
networkSetup/src/fixtures/desktop-app.rs
T
2026-11-02 13:44:00 +09:00

12 lines
513 B
Rust

#![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<u16> = option_env!("FIXTURE_NAME").unwrap_or("MSIX fixture").encode_utf16().chain(Some(0)).collect();
let text: Vec<u16> = "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); }
}