Closed rbtcollins closed 1 year ago
I'll take a look at this today or tomorrow
I apologise in advance for some of the code quality; this was implemented from necessity - I think its broadly fine and there is room to tidy it up, isolate the unsafe more etc. Just shout out if anything is unobvious (for example why X function rather than Y which is supported).
And you can find me on the rust (https://discord.gg/rust-lang) discord as lifeless
if you want chat in realtime.
https://github.com/microsoft/windows-rs/issues/2333
Is there a reason we couldn't just create a safe shim over RtlUnicodeStringInit
? Seems the major feature of the *Ex
version is that it can safely accept null pointers.
RtlUnicodeString doesn't handle long strings correctly, ..Ex does. Compare https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/string/initunicodestringex.htm and https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/string/initunicodestring.htm
(That said, I have no objection to using the non-Ex version, but we'll want to add the safety belts ourselves: since we're dealing with considerable unsafe code, I feel it is important to be as safe as possible ourselves).
Thank you, I've had a quick look.
I'm ok in principle with having local definitions as these things don't move super fast. OTOH the windows crate folk have been decently quick about the other bugs I've filed in the past, so perhaps lets get all the bugs filed and give them a week, and then if its still some undefined future time, we can merge and carry the local definitions.
Sounds good to me!
This is partially done, but a little stuck on:
@Xaeroxe offered in https://github.com/XAMPPRocky/remove_dir_all/pull/42 to help out; this is a call for that help :)