win32api.RegQueryValue fails

Achim Domma achim.domma at syynx.de
Sat Feb 2 10:07:38 EST 2002


Hi,

still not having solved my problem importing win32com in an embedded
interpreter , I tried to debug where the error comes from. My real problem
is that win32api.RegQueryValue fails.

The following code works without problems:

import win32api
print win32api.GetFullPathName(".")

but

import win32api
keyName = "SOFTWARE\\someKey"
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE , keyName, 0,
win32con.KEY_ALL_ACCESS)
win32api.RegQueryValue(key, "Root")

fails with a 'TypeError: this constructor takes no arguments'. If I print
the handle returned by RegOpenKey it is not Null, so it seems to be ok. A
look at the implementation of RegQueryValue (head-revision in cvs) showed
that it is implemented straight forward and I have no idea what should go
wrong.

I have to use ADO from my embedded python, which will not work without
win32com, so every little hint is welcome.

greetings
Achim






More information about the Python-list mailing list