From 2a62e84a234274b53cb77ffcef4ad76630ba7c2f Mon Sep 17 00:00:00 2001 From: amrbashir Date: Thu, 7 Mar 2024 18:57:48 +0200 Subject: [PATCH] fix(windows): link using "system" ABI --- src/windows.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/windows.rs b/src/windows.rs index 4784884..1f4381e 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -121,8 +121,7 @@ mod ffi { /// Null-terminated UTF-16 encoding of `open`. pub const OPEN: *const u16 = [111, 112, 101, 110, 0].as_ptr(); - #[link(name = "Shell32")] - extern "C" { + extern "system" { pub fn ShellExecuteW( hwnd: isize, lpoperation: *const u16, @@ -130,6 +129,6 @@ mod ffi { lpparameters: *const u16, lpdirectory: *const u16, nshowcmd: i32, - ) -> i32; + ) -> isize; } }