[][src]Struct win_kernel_driver::DriverBuilder

pub struct DriverBuilder { /* fields omitted */ }

Use this to build a kernel driver object you can interact with

Example

let driver_bin = include_bytes!("../winRing0.sys");
let driver = DriverBuilder::new()
             .set_device_description("winRing0 driver")
             .set_device_id("WinRing0_1_2_0")
             .set_driver_bin(driver_bin.to_vec())
             .build().unwrap();

Methods

impl DriverBuilder[src]

pub fn new() -> Self[src]

pub fn set_device_id(self, device_id: &'static str) -> Self[src]

Set the device id (required)

pub fn set_device_description(self, device_description: &'static str) -> Self[src]

Set the device description (required)

pub fn set_device_type(self, device_type: DWORD) -> Self[src]

Set the device type (defaults to FILE_DEVICE_UNKNOWN (0x00000022))

pub fn set_driver_path(self, driver_path: PathBuf) -> Self[src]

Set the path to the driver file (optional)

pub fn set_driver_bin(self, driver_bin: Vec<u8>) -> Self[src]

Use a bytearray for the driver. It will be written to a temporary location Useful with the !include_bin macro

pub fn build(&mut self) -> Result<WinKernelDriver, String>[src]

Build a WinKernelDriver instance

Auto Trait Implementations

impl RefUnwindSafe for DriverBuilder

impl Send for DriverBuilder

impl Sync for DriverBuilder

impl Unpin for DriverBuilder

impl UnwindSafe for DriverBuilder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.