Closed AndreiMuntea closed 1 month ago
Looks like this has since been fixed:
pub type DRIVER_UNLOAD = Option<unsafe extern "system" fn(driverobject: *const DRIVER_OBJECT)>;
Which version of the windows-sys
crate are you using? The fix may not yet have been included in a release on crates.io but you can test it directly against the repo as follows:
Summary
Hi! I noticed that in windows_sys::Wdk::Foundation crate
PDRIVER_UNLOAD is defined as
pub type PDRIVER_UNLOAD = ::core::option::Option<unsafe extern "system" fn() -> ()>;
but the correct C definition would be:
Note the missing DriverObject parameter. See docs at: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nc-wdm-driver_unload
Currently I'm working around the issue like:
Crate manifest
No response
Crate code
No response