Hacker News new | past | comments | ask | show | jobs | submit login

I've been coding against the Win32 API since Windows 95. While I won't argue it's perfect, it's certainly nowhere near "almost always wrong".

Anyway, where in the hivex code do you handle these non-Unicode encoded REG_SZ values?

Btw, the comment for hivex_value_multiple_strings is based on a mistaken interpretation of the documentation. There's nothing contradictory to what MoveFileEx does[1], it simply has a list with a single entry in the case of deletions, and a list with two entries in case of renames.

The REG_MULTI_SZ documentation[2] just points out, correctly, that you can't have a zero-length string within a list of other strings (ie with at least one non-empty string after it). This is of course obvious and hence redundant, but they highlight it for novice programmers.

[1]: https://docs.microsoft.com/en-us/windows/win32/api/winbase/n...

[2]: https://docs.microsoft.com/en-us/windows/win32/sysinfo/regis...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: