diff --git a/Cargo.toml b/Cargo.toml index 716781f..3e5fca6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,14 +37,15 @@ concurrent-queue = "2.1.0" pin-project-lite = "0.2.9" [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.45" +version = "0.48" features = [ + "Win32_Foundation", "Win32_Networking_WinSock", + "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_LibraryLoader", + "Win32_System_Threading", "Win32_System_WindowsProgramming", - "Win32_Storage_FileSystem", - "Win32_Foundation", ] [dev-dependencies] diff --git a/src/iocp/afd.rs b/src/iocp/afd.rs index 4a6600f..8292219 100644 --- a/src/iocp/afd.rs +++ b/src/iocp/afd.rs @@ -14,7 +14,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Once; use windows_sys::Win32::Foundation::{ - CloseHandle, HANDLE, HINSTANCE, NTSTATUS, STATUS_NOT_FOUND, STATUS_PENDING, STATUS_SUCCESS, + CloseHandle, HANDLE, HMODULE, NTSTATUS, STATUS_NOT_FOUND, STATUS_PENDING, STATUS_SUCCESS, UNICODE_STRING, }; use windows_sys::Win32::Networking::WinSock::{ @@ -102,7 +102,7 @@ macro_rules! define_ntdll_import { #[allow(non_snake_case)] impl NtdllImports { - unsafe fn load(ntdll: HINSTANCE) -> io::Result { + unsafe fn load(ntdll: HMODULE) -> io::Result { $( let $name = { const NAME: &str = concat!(stringify!($name), "\0"); diff --git a/src/iocp/port.rs b/src/iocp/port.rs index 3feae07..1ed9551 100644 --- a/src/iocp/port.rs +++ b/src/iocp/port.rs @@ -13,7 +13,8 @@ use std::time::Duration; use windows_sys::Win32::Foundation::{CloseHandle, HANDLE, INVALID_HANDLE_VALUE}; use windows_sys::Win32::Storage::FileSystem::SetFileCompletionNotificationModes; -use windows_sys::Win32::System::WindowsProgramming::{FILE_SKIP_SET_EVENT_ON_HANDLE, INFINITE}; +use windows_sys::Win32::System::Threading::INFINITE; +use windows_sys::Win32::System::WindowsProgramming::FILE_SKIP_SET_EVENT_ON_HANDLE; use windows_sys::Win32::System::IO::{ CreateIoCompletionPort, GetQueuedCompletionStatusEx, PostQueuedCompletionStatus, OVERLAPPED, OVERLAPPED_ENTRY,