Robert Shearman wrote:
It doesn't matter what MSDN says about szName, RegQueryValueExW still takes the size in bytes, not characters. I.e. count should be set to NAME_SIZE * sizeof(WCHAR), not NAME_SIZE.
Hi Robert,
Yes, indeed. I believe I may have had an editing accident with that one.
[...] [M]y point stands that the code is still passing in a smaller size than the size of the buffer and so is not correct.
You were indeed right on that and I was wrong. I only looked at what was coming in and not at what was being done to it subsequently. Thanks for the feedback.