|
Just one small clarification I think should be made.
The problem with the key names that contain NULL is not ANSI vs UNICODE. In Unicode, once the 0x00 0x00 unicode char was reached, this would make the API take it as the end-of-string and not include it in the key name.
The problem is that the native version does not rely on a NULL terminator (be it ANSI or UNICODE), but it receives the length of the key name in a separate parameter, thus allowing you to specify a certain length, and in the key name place any garbage you want, including NULLs.
There is already a RegCreateKeyW which handles Unicode chars and does not allow these hidden keys, because it also relies on a NULL (0x00 0x00) to detect the end of the key name.
|