diff options
Diffstat (limited to 'crates/windows-kernel-rs/src/device.rs')
| -rw-r--r-- | crates/windows-kernel-rs/src/device.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/windows-kernel-rs/src/device.rs b/crates/windows-kernel-rs/src/device.rs index 4dabfba..6bebc36 100644 --- a/crates/windows-kernel-rs/src/device.rs +++ b/crates/windows-kernel-rs/src/device.rs @@ -434,7 +434,9 @@ pub struct DeviceExtension { pub(crate) device_type: DeviceType, } -pub extern "C" fn dispatch_device(device: *mut DEVICE_OBJECT, irp: *mut IRP) -> NTSTATUS { +/// # Safety +/// `unsafe` +pub unsafe extern "C" fn dispatch_device(device: *mut DEVICE_OBJECT, irp: *mut IRP) -> NTSTATUS { let stack_location = unsafe { &*IoGetCurrentIrpStackLocation(irp) }; let device = unsafe { Device::from_raw(device) }; let vtable = device.vtable(); |