TRegistry_TryOpenKeyReadonly(Key, HKEY, ReadWow64 = True) in u_dzClassUtils opens the key with KEY_READ or KEY_WOW64_64KEY, so a 32 bit program reads the 64 bit view. TryReadStringList of the guard checks the subkey with Reg.KeyExists in that view, but then opens it with a new TRegistry.Create, i.e. without KEY_WOW64_64KEY. In a 32 bit program that reads the redirected 32 bit view (Wow6432Node) for keys below HKLM\Software, so the function returns False, or the list from the other view.
Possible fix: create the second TRegistry with the WOW64 bits of the guard's one, e.g. TRegistry.Create(KEY_READ or (Reg.Access and (KEY_WOW64_32KEY or KEY_WOW64_64KEY))); Delphi 6 has TRegistry.Access, and the unit already declares KEY_WOW64_64KEY where Windows.pas lacks it.
A test needs a key in both views of HKLM, so it needs admin rights to write; HKCU\Software is not redirected.
Found in the review of the fix for [bugs:#137] (r2601), by reading the code, not observed.
Fixed in revision [r2608].
Related
Commit: [r2608]