4 Sep 2005 05:06
Re: [patch] Don't append extra NUL to registry-strings.
Buzz <cygwin-patches.buzz <at> bavag.tmfweb.nl>
2005-09-04 03:06:00 GMT
2005-09-04 03:06:00 GMT
Op Tue, 30 Aug 2005 11:33:16 +0100 schreef Dave Korn in <SERRANO4brJta07SaZ600000362 <at> SERRANO.CAM.ARTIMI.COM>: : ----Original Message---- : > From: Corinna Vinschen [dropping NUL from strings returned by RegQueryValueEx] : > trailing \0. First, the \0 is part of the "file content" in a way. : : To me this is the even more important reason. Some registry strings do : include the trailing zero, some don't; I don't see how this could be. The (MS) windows API-reference (win32api.hlp) entry for RegQueryValueEx states (a.o.) | REG_EXPAND_SZ A null-terminated string that contains unexpanded | references to environment variables (for example, "%PATH%"). It will | be a Unicode or ANSI string depending on whether you use the Unicode | or ANSI functions. [...] | REG_MULTI_SZ An array of null-terminated strings, terminated by | two null characters. [..] | REG_SZ A null-terminated string. It will be a Unicode or ANSI string | depending on whether you use the Unicode or ANSI functions. [...] | If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, then | lpData will also include the size of the terminating null character. : cygwin shouldn't tamper with it. And(Continue reading)
]
This, however is to the point, and another reason to regret ever using
MS software.
Patch retracted.
RSS Feed