pub struct Driver { /* private fields */ }Expand description
safe driver object wrapper
Implementations§
Source§impl Driver
impl Driver
Sourcepub unsafe fn from_raw(ptr: *mut DriverObjectRaw) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut DriverObjectRaw) -> Option<Self>
Sourcepub fn as_raw(&self) -> *mut DriverObjectRaw
pub fn as_raw(&self) -> *mut DriverObjectRaw
get raw pointer
Sourcepub fn set_unload(&mut self, unload: DriverUnload)
pub fn set_unload(&mut self, unload: DriverUnload)
set driver unload routine
Sourcepub fn set_major_function(
&mut self,
function: IrpMajorFunction,
handler: DriverDispatch,
)
pub fn set_major_function( &mut self, function: IrpMajorFunction, handler: DriverDispatch, )
set major function handler
Sourcepub fn set_all_major_functions(&mut self, handler: DriverDispatch)
pub fn set_all_major_functions(&mut self, handler: DriverDispatch)
set all major functions to same handler
Sourcepub fn start_address(&self) -> *mut c_void
pub fn start_address(&self) -> *mut c_void
get driver start address
Sourcepub fn create_device(
&mut self,
name: &UnicodeString,
device_type: u32,
characteristics: u32,
exclusive: bool,
) -> KmResult<Device>
pub fn create_device( &mut self, name: &UnicodeString, device_type: u32, characteristics: u32, exclusive: bool, ) -> KmResult<Device>
create a device
Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl !Send for Driver
impl !Sync for Driver
impl Unpin for Driver
impl UnwindSafe for Driver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more