1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 use shared
::basetsd
::{PULONG_PTR, ULONG_PTR}
;
7 use shared
::minwindef
::{BOOL, DWORD, LPDWORD, LPVOID, PULONG, ULONG}
;
8 use um
::minwinbase
::{LPOVERLAPPED, LPOVERLAPPED_ENTRY}
;
11 pub fn CreateIoCompletionPort(
13 ExistingCompletionPort
: HANDLE
,
14 CompletionKey
: ULONG_PTR
,
15 NumberOfConcurrentThreads
: DWORD
,
17 pub fn GetQueuedCompletionStatus(
18 CompletionPort
: HANDLE
,
19 lpNumberOfBytesTransferred
: LPDWORD
,
20 lpCompletionKey
: PULONG_PTR
,
21 lpOverlapped
: *mut LPOVERLAPPED
,
22 dwMilliseconds
: DWORD
,
24 pub fn GetQueuedCompletionStatusEx(
25 CompletionPort
: HANDLE
,
26 lpCompletionPortEntries
: LPOVERLAPPED_ENTRY
,
28 ulNumEntriesRemoved
: PULONG
,
29 dwMilliseconds
: DWORD
,
32 pub fn PostQueuedCompletionStatus(
33 CompletionPort
: HANDLE
,
34 dwNumberOfBytesTransferred
: DWORD
,
35 dwCompletionKey
: ULONG_PTR
,
36 lpOverlapped
: LPOVERLAPPED
,
38 pub fn DeviceIoControl(
40 dwIoControlCode
: DWORD
,
44 nOutBufferSize
: DWORD
,
45 lpBytesReturned
: LPDWORD
,
46 lpOverlapped
: LPOVERLAPPED
,
48 pub fn GetOverlappedResult(
50 lpOverlapped
: LPOVERLAPPED
,
51 lpNumberOfBytesTransferred
: LPDWORD
,
56 lpOverlapped
: LPOVERLAPPED
,
61 pub fn GetOverlappedResultEx(
63 lpOverlapped
: LPOVERLAPPED
,
64 lpNumberOfBytesTransferred
: LPDWORD
,
65 dwMilliseconds
: DWORD
,
68 pub fn CancelSynchronousIo(