diff --git a/audioipc/Cargo.toml b/audioipc/Cargo.toml index f09dd87..326e056 100644 --- a/audioipc/Cargo.toml +++ b/audioipc/Cargo.toml @@ -34,7 +34,7 @@ version = "0.35" default-features = false [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.52", features = [ +windows-sys = { version = "0.61", features = [ "Win32_Foundation", "Win32_Security", "Win32_Storage_FileSystem", diff --git a/audioipc/src/lib.rs b/audioipc/src/lib.rs index 7b1652e..07f61b8 100644 --- a/audioipc/src/lib.rs +++ b/audioipc/src/lib.rs @@ -170,7 +170,7 @@ pub(crate) unsafe fn close_target_handle( let ok = DuplicateHandle( target_process, target_handle_to_close as _, - 0, + std::ptr::null_mut(), std::ptr::null_mut(), 0, FALSE, diff --git a/ipctest/Cargo.toml b/ipctest/Cargo.toml index 1a905c5..6e2488e 100644 --- a/ipctest/Cargo.toml +++ b/ipctest/Cargo.toml @@ -21,7 +21,7 @@ log = "0.4" libc = "0.2" [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.52", features = [ +windows-sys = { version = "0.61", features = [ "Win32_Foundation", "Win32_System_Threading", ] } diff --git a/ipctest/src/main.rs b/ipctest/src/main.rs index bf1def3..c33dbf4 100644 --- a/ipctest/src/main.rs +++ b/ipctest/src/main.rs @@ -105,9 +105,9 @@ fn run(wait_for_debugger: bool) -> Result<()> { // Duplicate the handle into the child process and send the value via stdin. let client_handle = unsafe { let child_process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, child_pid); - assert!(child_process != 0, "OpenProcess failed"); + assert!(!child_process.is_null(), "OpenProcess failed"); - let mut target_handle: HANDLE = 0; + let mut target_handle: HANDLE = std::ptr::null_mut(); let ok = DuplicateHandle( GetCurrentProcess(), fd as HANDLE, diff --git a/ipctest/tests/e2e.rs b/ipctest/tests/e2e.rs index 1eb03a1..77b7552 100644 --- a/ipctest/tests/e2e.rs +++ b/ipctest/tests/e2e.rs @@ -114,9 +114,9 @@ fn multi_process_client_test() { let client_handle = unsafe { let child_process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, child_pid); - assert!(child_process != 0, "OpenProcess failed"); + assert!(!child_process.is_null(), "OpenProcess failed"); - let mut target_handle: HANDLE = 0; + let mut target_handle: HANDLE = std::ptr::null_mut(); let ok = DuplicateHandle( GetCurrentProcess(), fd as HANDLE,