Finally, I know why it fails!!!!
This call works perfectly in Windows 2000 and XP:
lResult = RegOpenKeyEx (hKeyRoot, lpSubKey, 0, KEY_READ, &hKey);
But this one fails in Windows 2000
lResult = RegOpenKeyEx (hKeyRoot, lpSubKey, 0, KEY_READ|KEY_WOW64_32KEY, &hKey);
The difference? The KEY_WOW64_32KEY! That is what is breaking compatibility with windows 2000! And SIGAR is using KEY_WOW64_32KEY at registrykey.cpp (stored inside the RegOpenOpts variable)
I remember reading somewhere in SIGAR JIRA that this support for 64 bit/32 bit registry access was added recently...
Message was edited by: franciscoperedo