windows-sys
doesn't distinguish between LPCWSTR
and LPWSTR
#1504
Labels
enhancement
New feature or request
Crate version: 0.32.0
This is similar to #1490, but perhaps a bit more specific.
windows-sys
doesn't distinguish between mutable and immutable string pointers, so all functions get whateverLPWSTR
is aliased to (used to be*mut u16
, now it's*const u16
). Withtype LPWSTR = *const u16
, APIs likeGetWindowTextW
now take a*const u16
where they should take a*mut u16
, which is a problem.There's a similar issue with
ImmSetCompositionWindow
, where the function is documented on MSDN as taking anLPCOMPOSITIONFORM
(*mut COMPOSITIONFORM
), butwindows-sys
says it takes a*const COMPOSITIONFORM
.The text was updated successfully, but these errors were encountered: