Yeah, of course, since LongInt($80000001), before typecasting to HKEY, is specifically a signed constant.  So obvious!!

Kit

On 12/02/2023 20:43, Bart via fpc-devel wrote:
On Sun, Feb 12, 2023 at 6:26 PM J. Gareth Moreton via fpc-devel
<fpc-devel@lists.freepascal.org> wrote:
If HKey is unsigned, then yes, the definition should be
HKEY(DWORD($80000001)).  I do wonder why Win64 produces that particular
error though because the final destination is an unsigned 64-bit integer.
Because QWord(some not so big negative number) = some large positive number.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to