We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
IO_STATUS_BLOCK
1 parent 949b98c commit 66faaa8Copy full SHA for 66faaa8
library/std/src/sys/windows/c.rs
@@ -316,15 +316,21 @@ impl Default for OBJECT_ATTRIBUTES {
316
}
317
318
#[repr(C)]
319
-pub struct IO_STATUS_BLOCK {
320
- pub Pointer: *mut c_void,
321
- pub Information: usize,
+union IO_STATUS_BLOCK_union {
+ Status: NTSTATUS,
+ Pointer: *mut c_void,
322
323
-impl Default for IO_STATUS_BLOCK {
+impl Default for IO_STATUS_BLOCK_union {
324
fn default() -> Self {
325
- Self { Pointer: ptr::null_mut(), Information: 0 }
+ Self { Pointer: ptr::null_mut() }
326
327
328
+#[repr(C)]
329
+#[derive(Default)]
330
+pub struct IO_STATUS_BLOCK {
331
+ u: IO_STATUS_BLOCK_union,
332
+ pub Information: usize,
333
+}
334
335
pub type LPOVERLAPPED_COMPLETION_ROUTINE = unsafe extern "system" fn(
336
dwErrorCode: DWORD,
0 commit comments