try {
// open root key
phkResult = Advapi32Util.registryGetKey(WinReg.HKEY_CLASSES_ROOT,
"CLSID", WinNT.KEY_ALL_ACCESS);
// open subkey
InfoKey infoKey = Advapi32Util.registryQueryInfoKey(
phkResult.getValue(), WinNT.KEY_ALL_ACCESS);
for (int i = 0; i < infoKey.lpcSubKeys.getValue(); i++) {
EnumKey enumKey = Advapi32Util.registryRegEnumKey(
phkResult.getValue(), i);
subKey = Native.toString(enumKey.lpName);
COMInfo comInfo = new COMInfo(subKey);
phkResult2 = Advapi32Util.registryGetKey(phkResult.getValue(),
subKey, WinNT.KEY_ALL_ACCESS);
InfoKey infoKey2 = Advapi32Util.registryQueryInfoKey(
phkResult2.getValue(), WinNT.KEY_ALL_ACCESS);
for (int y = 0; y < infoKey2.lpcSubKeys.getValue(); y++) {
EnumKey enumKey2 = Advapi32Util.registryRegEnumKey(
phkResult2.getValue(), y);