DriverImpl

Trait DriverImpl 

Source
pub trait DriverImpl {
    // Required methods
    fn init(driver: &mut Driver, registry_path: &UnicodeString) -> KmResult<()>;
    fn unload(driver: &Driver);

    // Provided methods
    fn create(_device: *mut c_void, _irp: &mut Irp) -> NtStatus { ... }
    fn close(_device: *mut c_void, _irp: &mut Irp) -> NtStatus { ... }
    fn device_control(_device: *mut c_void, _irp: &mut Irp) -> NtStatus { ... }
    fn read(_device: *mut c_void, _irp: &mut Irp) -> NtStatus { ... }
    fn write(_device: *mut c_void, _irp: &mut Irp) -> NtStatus { ... }
}
Expand description

helper trait for implementing driver entry

Required Methods§

Source

fn init(driver: &mut Driver, registry_path: &UnicodeString) -> KmResult<()>

called during driver initialization

Source

fn unload(driver: &Driver)

called during driver unload

Provided Methods§

Source

fn create(_device: *mut c_void, _irp: &mut Irp) -> NtStatus

handle IRP_MJ_CREATE

Source

fn close(_device: *mut c_void, _irp: &mut Irp) -> NtStatus

handle IRP_MJ_CLOSE

Source

fn device_control(_device: *mut c_void, _irp: &mut Irp) -> NtStatus

handle IRP_MJ_DEVICE_CONTROL

Source

fn read(_device: *mut c_void, _irp: &mut Irp) -> NtStatus

handle IRP_MJ_READ

Source

fn write(_device: *mut c_void, _irp: &mut Irp) -> NtStatus

handle IRP_MJ_WRITE

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§