[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2016-06-01 Thread Tony Grue
Tony Grue added the comment: I see this was closed,though it sounds like it's because a work around is found, not because the code now handles multiple null values in a row. Looking at code from the github mirror (pasted below); it looks like the issue is that the countStrings function breaks

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2010-08-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> wont fix status: open -> closed type: behavior -> feature request ___ Python tracker ___ ___

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-09 Thread Andrew Ziem
Andrew Ziem added the comment: Well, I no longer need QueryValueEx because I found out win32file.MoveFileEx() does more easily what I need, but MoveFileEx (see attachment for working example) shows that the Microsoft Window API itself creates these "invalid values" -- Added file: http:/

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-09 Thread Andrew Ziem
Andrew Ziem added the comment: Yes, regedit does remove the blanks, but this bug report is about QueryValueEx---not about SetValueEx :). There must be a way to read all the values compatible with Windows -- ___ Python tracker

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, but did you try to press "OK"? Regedit displays a warning that empty lines are not allowed, and *removes* them. -- ___ Python tracker __

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-09 Thread Andrew Ziem
Andrew Ziem added the comment: Attached screenshot shows regedit handles \x00\x00 by showing all the "invalid values" (each \x00 becomes a line break). More importantly, Windows apparently reads all the "invalid value" when processing FileRenameOperations, so my Python program must be able to r

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: It seems that regedit itself cannot handle these values, see how users have to edit data in binary mode to enter empty strings: http://www.pcreview.co.uk/forums/thread-1715654.php Here is a script that shows the problem: the value is returned truncated be

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The double null is supposed to mark the end of the whole sequence; the content you show under "PendingFileRenameOperations" is a invalid REG_MULTI_SZ value to me. How does regedit display it? -- nosy: +amaury.forgeotdarc _

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-08 Thread Andrew Ziem
Andrew Ziem added the comment: The bug is noted in the Python source code in file PC/_winreg.c in in function fixupMultiSZ() where it admits Python does not mimic Microsoft regedit.exe -- ___ Python tracker ___

[issue6443] _winreg.QueryValueEx confused on double null terminated strings

2009-07-08 Thread Andrew Ziem
New submission from Andrew Ziem : QueryValueEx only returns one string when the contents are double null terminated, yet QueryValueEx works when the string is singly null terminated. In Python 2.5.4 on Windows XP Sp3, the first key-value only returns the first part up to \0\0. --