[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] I am cleaning the Win32 security plugin unicode mess. (2a6304d)

Nicolas Cellier notifications at github.com
Thu Jan 3 08:14:43 UTC 2019


Unfortunately, this ain't gonna work, because dwSize is the size of the buffer in bytes, not the size in character (WCHAR)

This is because RegQueryValueEx is very low level and can read several types, thus handle the buffer as un-interpreted bytes.
Therefore, dwSize must be multiplied by sizeof(WCHAR) before the call, and divided by sizeof(WCHAR) after the call if we use the RegExQueryValueW variant, so as to express the size in characters like we intend to.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2a6304d3586af4d7ada93d74be9ab4bcccbacdec#commitcomment-31827279
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190103/36eb458a/attachment.html>


More information about the Vm-dev mailing list