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 whatever LPWSTR is aliased to (used to be *mut u16, now it's *const u16). With type LPWSTR = *const u16, APIs like GetWindowTextW 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 an LPCOMPOSITIONFORM (*mut COMPOSITIONFORM), but windows-sys says it takes a *const COMPOSITIONFORM.
Crate version: 0.32.0
This is similar to #1490, but perhaps a bit more specific.
windows-sysdoesn't distinguish between mutable and immutable string pointers, so all functions get whateverLPWSTRis aliased to (used to be*mut u16, now it's*const u16). Withtype LPWSTR = *const u16, APIs likeGetWindowTextWnow take a*const u16where 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-syssays it takes a*const COMPOSITIONFORM.