diff options
| author | pravic <[email protected]> | 2016-04-28 23:19:31 +0300 |
|---|---|---|
| committer | pravic <[email protected]> | 2016-04-28 23:19:31 +0300 |
| commit | 0b6b4bc02a1ea7bd6034c59d5627916779296b6d (patch) | |
| tree | b346be429689fd774f4c99512e882e882c979b94 /examples/01.minimal/driver.rs | |
| parent | typo (diff) | |
| download | winapi-kmd-rs-0b6b4bc02a1ea7bd6034c59d5627916779296b6d.tar.xz winapi-kmd-rs-0b6b4bc02a1ea7bd6034c59d5627916779296b6d.zip | |
small updates for samples
Diffstat (limited to 'examples/01.minimal/driver.rs')
| -rw-r--r-- | examples/01.minimal/driver.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/01.minimal/driver.rs b/examples/01.minimal/driver.rs index d446ff0..32e2dad 100644 --- a/examples/01.minimal/driver.rs +++ b/examples/01.minimal/driver.rs @@ -8,9 +8,10 @@ use core::mem; use km::*; #[no_mangle] -pub extern "system" fn DriverEntry(_obj: *mut km::DRIVER_OBJECT, _path: *const km::string::UnicodeString) -> Status +pub extern "system" fn DriverEntry(driver: *mut km::DRIVER_OBJECT, _path: *const km::string::UnicodeString) -> Status { KdPrint!("[rs] hello, rust!\n"); - KdPrint!("[rs] we are DriverObject at 0x%p, sizeof %d\n", _obj, mem::size_of::<km::DRIVER_OBJECT>()); + let cb = mem::size_of::<km::DRIVER_OBJECT>(); + KdPrint!("[rs] we are DriverObject at 0x%p, sizeof 0x%X (%d bytes), expected size 0xA8 or 0x150\n", driver, cb, cb); return Status::unsuccessful; // return error to unload driver now } |