Closed Xaeroxe closed 1 year ago
This is a WDK function - will transfer to the Win32 metadata repo as they're working on adding WDK support.
Everything in ntstrsafe.h appears to be inline functions, which aren't supported in the metadata.
Since Rust driver development is the target, should someone try to implement these natively in Rust?
We only support metadata-generated bindings. So, if there aren't any function exports then there's nothing here for windows-rs
to consume. Developers are free to implement these in their own crates.
Thats a fair decision to take, but I will note that it means folk have to dig up the function and reimplement, rather than the Rust crates Microsoft publish having a reference implementation - its a lost opportunity to reduce friction for building things in Rust.
And for the record, the target wasn't/isn't Rust driver development, it was necessary tooling to use NTCreateFile APIs, to implement a crate that works analogous to posix openat/rmdirat etc calls.
We can always reevaluate but at this point we have almost no WDK coverage to begin with. We need to get exports fleshed out and viable before considering additional hand-written APIs.
The status on this could perhaps be changed to 'Fixed' as I now see this available at windows_sys::Wdk::Storage::FileSystem::RtlInitUnicodeStringEx
with feature Wdk_Storage_FileSystem enabled. Though its weird about the feature enabling it :). Thank you!
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntstrsafe/nf-ntstrsafe-rtlunicodestringinitex this API is missing. I think it's pretty easy to add but I'm not sure.