On Sun, Feb 12, 2023 at 10:49 PM Bart <bartjun...@gmail.com> wrote: > For 32-bit builds this results in the final HKEY value being identical > to the original literal value, but for 64-bit builds, because of the > intermediate signed LONG cast which is then cast to the larger > unsigned ULONG_PTR type, the original value is effectively > sign-extended to 64-bits, resulting in the most significant 32 bits > being set. So in 64-bit architectures HKEY_CLASSES_ROOT is > 0xFFFFFFFF80000000, HKEY_CURRENT_USER is 0xFFFFFFFF80000001, and so > on.
Notice that it seems that I can use QWord($0000000080000001) for HKE_CURRENT_USER on Win64 (at least for RegOpenKeyReadOnly). -- Bart _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel