You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
windows-bindgen fails, to resolve namespaces. Even if I swap it out, for another. It can find individual structs, functions just fine.
The Windows.Win32.System.Com was copied from the readme, so I know that's not a typo. Windows.Win32.Networking.ActiveDirectory was one that I copied from an older project, that used windows-rs 0.62, so that should be right.
I also tried adding .input_default(), but that didn't change anything.
Error:
error: failed to run custom build command for `ad-walker v0.1.0 (C:\nerd_stuff\rust\ad-walker)`
Caused by:
process didn't exit successfully: `C:\nerd_stuff\rust\ad-walker\target\debug\build\ad-walker-c773547f9cb46378\build-script-build` (exit code: 101)
--- stderr
thread 'main' (26304) panicked at C:\rust-lang\cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows-bindgen-0.100.0\src\filter_parser.rs:163:21:
could not resolve filter entry `Windows::Win32::System::Com`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
You should be able to just remove the namespace prefix entirely - windows-bindgen will find the best match. Technically, all of the non-WinRT types now appear in the Windows.Win32 namespace as this represents the "global" namespace in metadata.
So for example, you can use Windows.Win32.CoCreateInstance if you'd prefer to be explicit or just CoCreateInstance and it will work just as well.
That works, but I don't want to set many filters, if 2 can do the job. I just need everything inside those 2 namespaces (especially ActiveDirectory). Is there an easier way, other than typing all the functions and constants?
Activity
kennykerr commentedon Sep 14, 2026
The docs need to be improved - sorry about that.
You should be able to just remove the namespace prefix entirely -
windows-bindgenwill find the best match. Technically, all of the non-WinRT types now appear in theWindows.Win32namespace as this represents the "global" namespace in metadata.So for example, you can use
Windows.Win32.CoCreateInstanceif you'd prefer to be explicit or justCoCreateInstanceand it will work just as well.Cinimajig commentedon Sep 14, 2026
That works, but I don't want to set many filters, if 2 can do the job. I just need everything inside those 2 namespaces (especially ActiveDirectory). Is there an easier way, other than typing all the functions and constants?
[-]windows-bindgen can't resolve namespaces[/-][+]`windows-bindgen` can't resolve namespaces[/+]kennykerr commentedon Sep 14, 2026
If you'd rather not filter APIs specifically, you may want to consider using the umbrella crate that provides groupings based on the headers that the APIs originate in. https://github.com/microsoft/windows-rs/blob/master/docs/crates/windows.md
LastExceed commentedon Sep 18, 2026
Why was this feature removed?