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
use ::{NTSTATUS, UNICODE_STRING};
use ::device_object::*;
use ::irp::IRP;
pub type PDRIVER_INITIALIZE = Option<extern "system" fn (_self: &mut DRIVER_OBJECT, &UNICODE_STRING) -> NTSTATUS>;
pub type PDRIVER_STARTIO = Option<extern "system" fn (_self: &mut DRIVER_OBJECT, &IRP)>;
pub type PDRIVER_UNLOAD = Option<extern "system" fn (_self: &mut DRIVER_OBJECT)>;
#[repr(C)]
pub struct DRIVER_OBJECT
{
pub Type: u16,
pub Size: u16,
pub DeviceObject: *mut DEVICE_OBJECT,
pub Flags: u32,
pub DriverStart: *const u8,
pub DriverSize: u32,
pub DriverSection: *const u8,
pub DriverExtension: *mut u8,
pub DriverName: UNICODE_STRING,
pub HardwareDatabase: *const UNICODE_STRING,
pub FastIoDispatch: *mut u8,
pub DriverInit: PDRIVER_INITIALIZE,
pub DriverStartIo: PDRIVER_STARTIO,
pub DriverUnload: PDRIVER_UNLOAD,
pub MajorFunction: [PDRIVER_DISPATCH; 28],
}