View Single Post
  #14  
Old 07-04-2005, 09:09
Mkz Mkz is offline
Friend
 
Join Date: Jan 2002
Posts: 98
Rept. Given: 0
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 5
Thanks Rcvd at 25 Times in 17 Posts
Mkz Reputation: 2
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.
Reply With Quote