For Windows, the Unicode WinAPI functions should be used. You can create a null-terminated wide-string buffer with HSTRING (reexported by windows crate), which has From implementations and .as_ptr(). Creating it inside the argument list makes it live until after the call. This also lets you get rid of a manual \0.
For Windows, the Unicode WinAPI functions should be used. You can create a null-terminated wide-string buffer with
HSTRING(reexported bywindowscrate), which hasFromimplementations and.as_ptr(). Creating it inside the argument list makes it live until after the call. This also lets you get rid of a manual\0.