All driver callback types looks like Option<unsafe extern "system"fn (...)>, but it is wrong as it makes impossible to use them properly.
Let's look on the DRIVER_OBJECT::MajorFunction:
It means that MajorFunction is array of pointers to Option that holds a pointer to the handler - so, it's a pointer to pointer!
It should be something like that in such cases:
Summary
All driver callback types looks like
Option<unsafe extern "system"fn (...)>
, but it is wrong as it makes impossible to use them properly.Let's look on the
DRIVER_OBJECT::MajorFunction
:It means that
MajorFunction
is array of pointers toOption
that holds a pointer to the handler - so, it's a pointer to pointer! It should be something like that in such cases:Crate manifest
No response
Crate code
No response