Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: After several failed attempts at making a test case, and stepping through C code with a debugger, I see that my initial diagnose is quite wrong. RegQueryInfoKey *does* return the sizes in units of bytes (even though the Microsoft documentation says otherwise). My apologies.
I do still have a stack trace from an end-user of my python2.5-based product, showing that _winreg.EnumValue raises: WindowsError: [Error 234] More data is available The application reliably crashes on start-up for this user, when trying to read some registry entries written by another program and hitting the above exception. Unfortunately, I have been unable to reproduce the problem locally. I tried a variety of Unicode characters (including some that encode to 4 bytes), and that didn't raise an exception. I also tried putting some very long data strings (more than 64kb) into the registry, and that worked fine too (even though the Microsoft documentation says the ANSI version *should* return the above exception!). I'm going to try building a custom PyEnumValue that will dynamically grow the buffer size when that error occurs. I'll report back on how that works out for the end user. In the meantime, I'm open to other theories on what might cause RegEnumValue to fail with that error. The end user is running Vista, if it matters. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2810> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com