[−][src]Struct win_kernel_driver::DriverBuilder
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,