1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
pub mod virtdisk;
pub mod virtdisk_bindings;
pub mod virtdiskdefs;
pub mod windefs {
use libc;
pub type Bool = libc::c_int;
pub type Byte = libc::c_uchar;
pub type DWord = libc::c_ulong;
pub type Handle = *mut libc::c_void;
pub type PCWStr = *const libc::wchar_t;
pub type PWStr = *mut libc::wchar_t;
pub type PSId = *mut Void;
pub type SecurityDescriptorControl = libc::c_ushort;
pub type Word = libc::c_ushort;
pub type Void = libc::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Guid {
pub data1: libc::c_ulong,
pub data2: libc::c_ushort,
pub data3: libc::c_ushort,
pub data4: [libc::c_uchar; 8],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Acl {
pub acl_revision: Byte,
pub sbz1: Byte,
pub acl_size: Word,
pub ace_count: Word,
pub sbz2: Word,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SecurityDescriptor {
pub revision: Byte,
pub sbz1: Byte,
pub control: SecurityDescriptorControl,
pub owner: PSId,
pub group: PSId,
pub sacl: *mut Acl,
pub dacl: *mut Acl,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OverlappedPointerDetails {
pub offset: DWord,
pub offset_high: DWord,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union OverlappedPointer {
pub details: OverlappedPointerDetails,
pub pointer: *mut Void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct Overlapped {
pub internal: *mut u64,
pub internal_high: *mut u64,
pub pointer: OverlappedPointer,
pub h_event: Handle,
}
}