[python-win32] _winreg.EnumValue, etc.
Mark Hammond
mhammond@skippinet.com.au
Wed, 22 Jan 2003 10:00:26 +1100
> We are trying to read all of the data under specific registry keys.
> Unfortunately, we cannot seem to enumerate keys or values
> correctly if
> the name contains Unicode or binary characters.
Eeek - you mean the *value* names can contain embedded NULL characters?!
I don't think you will find a version that works correctly here. You will
need to either:
* track down calldll or ctypes, and make a "native" call to this API
function, fiddling the bits yourself.
* be able to build either Python or win32all, and test a fix I will make :)
* hack your own extension together with just this function.
> _winreg.EnumValue, _winreg.EnumKey, win32api.RegEnumValue, and
> win32api.RegEnumKey all seem to return an ascii-ized version of data
> instead of just returning a string that contains the correct bytes.
Well, the *data* is handled correctly, but not the value name.
> By the way, it looks like the characters in a registry value name can
> have any 16 bit value except the char(0). The registry key names also
> cannot contain a backslash.
I assume you mean that the Ascii versions of these functions use an 8 bit
MBCS encoding of 16 bit unicode characters?
Mark.