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

Bug: windows_sys::Wdk::Foundation::DRIVER_OBJECT requires feature Win32_Graphics_DirectDraw #2543

Closed
wbenny opened this issue Jun 17, 2023 · 7 comments
Labels
question Further information is requested

Comments

@wbenny
Copy link

wbenny commented Jun 17, 2023

Which crate is this about?

windows-sys

Crate version

0.48.0

Summary

windows_sys::Wdk::Foundation::DRIVER_OBJECT requires feature Win32_Graphics_DirectDraw, however that feature is missing in sys/Cargo.toml

Toolchain version/configuration

No response

Reproducible example

No response

Crate manifest

No response

Expected behavior

No response

Actual behavior

No response

Additional comments

No response

@wbenny wbenny added the bug Something isn't working label Jun 17, 2023
@wbenny
Copy link
Author

wbenny commented Jun 17, 2023

The whole DirectDraw is missing in the sys crate.
For some reason, the pub struct MDL is expected there - and sure, in non-sys crate, the MDL struct is in there.

@kennykerr
Copy link
Collaborator

I first reported this issue here: microsoft/wdkmetadata#35

It looks like it might have been fixed, but windows-rs hasn't taken a Win32/Wdk metadata update in a while.

@kennykerr kennykerr added question Further information is requested and removed bug Something isn't working labels Jun 17, 2023
@wbenny
Copy link
Author

wbenny commented Jun 17, 2023

Ah, good to know. Thanks!

Also, there are more discrepancies in the Wdk.

For example, in Wdk/Foundation, there is:
pub type PDRIVER_UNLOAD = ::core::option::Option<unsafe extern "system" fn() -> ()>;

but Wdk/System/SystemServices has:
pub type DRIVER_UNLOAD = ::core::option::Option<unsafe extern "system" fn(driverobject: *const super::super::Foundation::DRIVER_OBJECT) -> ()>;

also, driver dispatch routine seems off in Wdk/Foundation:
pub type PDRIVER_DISPATCH = ::core::option::Option<unsafe extern "system" fn() -> super::super::Win32::Foundation::NTSTATUS>; - it should accept DEVICE_OBJECT* and IRP* in the parameters.

Should I create separate issue for this, or is this addressed in the wdkmetadata already as well?

@kennykerr
Copy link
Collaborator

Yep if you are unsure feel free to open issues on the wdk repo.

@kennykerr
Copy link
Collaborator

#2573 updated the repo with the latest metadata. Please kick the tires and let me know if you experience any issues.

@wbenny
Copy link
Author

wbenny commented Jul 13, 2023

Thanks! The issue with feature gate went away, though the discrepancy between PDRIVER_UNLOAD/PDRIVER_DISPATCH types is still there.

@kennykerr
Copy link
Collaborator

Please open an issue on the appropriate repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants