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

Add fltkernel.h to base headers #307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

wedsonaf
Copy link

@wedsonaf wedsonaf commented Mar 7, 2025

This allows rust drivers to use fltmgr.

This allows rust drivers to use fltmgr.
Copy link
Collaborator

@wmmc88 wmmc88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the change is causing redefinitions of the GUIDs when other cargo features are enabled (ex. HID + STORAGE). this seems to be caused by fltkernel.h adding initguid.h which is now causing all the other guids in other headers to be both declared and (re-)defined.

In bindgen_header_contents, you can special-case the ApiSubset case that includes fltkernel.h to also prepend something like:

// Force DEFINE_GUID to only declare GUIDS, and not define them (regardless if downstream headers try to include initguid.h)
#include <initguid.h>
#undef INITGUID
#include <guiddef.h>

@wmmc88
Copy link
Collaborator

wmmc88 commented Mar 17, 2025

Another thing of note is that fltkernel.h seems to be part of the Filesystem subset of the WDK. I think it makes sense to separate it out as its own cargo feature, similar to what was done in #260, #263, #278, #287, etc.

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

Successfully merging this pull request may close these issues.

2 participants