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
use ::basedef::*;
use ::device_object::PDEVICE_OBJECT;
use ::irp::IRP;
#[repr(C)]
pub struct WAIT_CONTEXT_BLOCK
{
WaitQueueEntry: *mut KDEVICE_QUEUE_ENTRY,
DeviceRoutine: extern "system" fn (_obj: PDEVICE_OBJECT, _irp: *mut IRP, *mut u8, *mut u8) -> IO_ALLOCATION_ACTION,
DeviceContext: *mut u8,
NumberOfMapRegisters: u32,
DeviceObject: *mut u8,
CurrentIrp: *mut u8,
BufferChainingDpc: * mut u8,
}
#[repr(C)]
pub enum IO_ALLOCATION_ACTION
{
KeepObject = 0x01,
DeallocateObject = 0x02,
DeallocateObjectKeepRegisters = 0x03,
}
#[repr(C)]
pub struct KDEVICE_QUEUE_ENTRY
{
DeviceListEntry: LIST_ENTRY,
SortKey: u32,
Inserted: bool,
}
#[repr(C)]
pub struct KDEVICE_QUEUE
{
Type: u16,
Size: u16,
DeviceListHead: LIST_ENTRY,
Lock: KSPIN_LOCK,
Busy: bool,
}