Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver installation crashes when using EvtIoInternalDeviceControl #100

Open
lurebat opened this issue Feb 5, 2024 · 0 comments
Open

Driver installation crashes when using EvtIoInternalDeviceControl #100

lurebat opened this issue Feb 5, 2024 · 0 comments
Assignees

Comments

@lurebat
Copy link

lurebat commented Feb 5, 2024

I'm trying to use the repo to write a keyboard driver - https://github.com/lurebat/interustception

My problem is as such:

When using WDF_IO_QUEUE_CONFIG, everything is fine as long as I use EvtIoDeviceControl.

But as soon as I try to set EvtIoInternalDeviceControl, installing hangs forever. The setup file in C:\windows\inf writes binary gibberish.

The callback function has the correct signature, and marked with

        #[no_mangle]
        #[link_section = "PAGE"]
        pub unsafe extern "C"

I can gurantee the object is initialized correctly (as I have debug prints).
The device_create functions returns with a successful code, it hangs later on when trying to start the device.

I even tried marking all of my user-made functions with link_section=PAGE, and I suspect it might be something in this area, or something deallocates before it needs to - but I can't figure it out.

The callback isn't even called as far as I can tell - breakpoints don't set, prints don't print, etc.

I haven't found anything online on a similar problem, and at this point I'm desperate - so maybe it's the framework or rust.

Even ideas to how to debug it would be great help.

Thanks!

@wmmc88 wmmc88 self-assigned this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants