Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: Sorry, my patch didn't pass test_dynamic_key(test_winreg). (Apologize for not testing on unit test)
RegEnumValueA and RegQueryInfoKeyA always returned 0 for required data size if target is HKEY_PERFORMANCE_DATA. The possible fixes I can imagine are... 1. Use GetCPInfo() to get MaxCharSize. http://msdn.microsoft.com/en-us/library/dd317780%28v=VS.85%29.aspx We can get a large value enough to store the key name in ANSI by "The length in Unicode" * MaxCharSize. 2. Use RegEnumValueW and convert result via WideCharToMultiByte I'll attach the patch with option 1. ---------- Added file: http://bugs.python.org/file19021/py27_fix_winreg_EnumValue_op1.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9937> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com