From 385cf26f45948211810d720f1d153591254a5b18 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 3 Feb 2022 14:03:33 -0800 Subject: [PATCH] v32 --- core/Cargo.toml | 2 +- core/src/thread_parker/windows/keyed_event.rs | 8 ++++---- core/src/thread_parker/windows/waitaddress.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index b73e0ac0..f00c3e19 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -23,7 +23,7 @@ libc = "0.2.95" redox_syscall = "0.2.8" [target.'cfg(windows)'.dependencies] -windows-sys = { version = "0.29", features = [ +windows-sys = { version = "0.32", features = [ "Win32_Foundation", "Win32_System_LibraryLoader", "Win32_System_SystemServices", diff --git a/core/src/thread_parker/windows/keyed_event.rs b/core/src/thread_parker/windows/keyed_event.rs index 8523a37a..bbe45a4c 100644 --- a/core/src/thread_parker/windows/keyed_event.rs +++ b/core/src/thread_parker/windows/keyed_event.rs @@ -56,17 +56,17 @@ impl KeyedEvent { #[allow(non_snake_case)] pub fn create() -> Option { unsafe { - let ntdll = GetModuleHandleA(b"ntdll.dll\0".as_ptr() as *mut u8); + let ntdll = GetModuleHandleA(b"ntdll.dll\0".as_ptr()); if ntdll == 0 { return None; } let NtCreateKeyedEvent = - GetProcAddress(ntdll, b"NtCreateKeyedEvent\0".as_ptr() as *mut u8)?; + GetProcAddress(ntdll, b"NtCreateKeyedEvent\0".as_ptr())?; let NtReleaseKeyedEvent = - GetProcAddress(ntdll, b"NtReleaseKeyedEvent\0".as_ptr() as *mut u8)?; + GetProcAddress(ntdll, b"NtReleaseKeyedEvent\0".as_ptr())?; let NtWaitForKeyedEvent = - GetProcAddress(ntdll, b"NtWaitForKeyedEvent\0".as_ptr() as *mut u8)?; + GetProcAddress(ntdll, b"NtWaitForKeyedEvent\0".as_ptr())?; let NtCreateKeyedEvent: extern "system" fn( KeyedEventHandle: *mut HANDLE, diff --git a/core/src/thread_parker/windows/waitaddress.rs b/core/src/thread_parker/windows/waitaddress.rs index af85d073..dde0db7b 100644 --- a/core/src/thread_parker/windows/waitaddress.rs +++ b/core/src/thread_parker/windows/waitaddress.rs @@ -36,14 +36,14 @@ impl WaitAddress { // MSDN claims that that WaitOnAddress and WakeByAddressSingle are // located in kernel32.dll, but they are lying... let synch_dll = - GetModuleHandleA(b"api-ms-win-core-synch-l1-2-0.dll\0".as_ptr() as *mut u8); + GetModuleHandleA(b"api-ms-win-core-synch-l1-2-0.dll\0".as_ptr()); if synch_dll == 0 { return None; } - let WaitOnAddress = GetProcAddress(synch_dll, b"WaitOnAddress\0".as_ptr() as *mut u8)?; + let WaitOnAddress = GetProcAddress(synch_dll, b"WaitOnAddress\0".as_ptr())?; let WakeByAddressSingle = - GetProcAddress(synch_dll, b"WakeByAddressSingle\0".as_ptr() as *mut u8)?; + GetProcAddress(synch_dll, b"WakeByAddressSingle\0".as_ptr())?; Some(WaitAddress { WaitOnAddress: mem::transmute(WaitOnAddress),