commit ce9966a39b8ab33504bfb185b5f78bddef49b28e (tree)
parent b05a5a3e52a0b14396d94c0d659edc980c1d79ce
Author: daurnimator <quae@daurnimator.com>
Date: Tue, 19 Nov 2019 16:39:50 +1100
std: improved windows.DeviceIoControl
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
@@ -132,6 +132,7 @@ pub fn DeviceIoControl(
overlapped,
) == 0) {
switch (kernel32.GetLastError()) {
+ ERROR.IO_PENDING => if (overlapped == null) unreachable,
else => |err| return unexpectedError(err),
}
}
diff --git a/lib/std/os/windows/kernel32.zig b/lib/std/os/windows/kernel32.zig
@@ -59,7 +59,7 @@ pub extern "kernel32" stdcallcc fn DeviceIoControl(
nInBufferSize: DWORD,
lpOutBuffer: ?LPVOID,
nOutBufferSize: DWORD,
- lpBytesReturned: LPDWORD,
+ lpBytesReturned: ?*DWORD,
lpOverlapped: ?*OVERLAPPED,
) BOOL;