No these are
unsigned ints......Pointers are unsigned because you can not get below existing memory....
This is a legacy issue, but nowadays the
hex notation assumes unsigned and is correct and not your code.
You need to cast a hexadecimal to a signed type depending on what is asked by some API.
Your code demonstrates this ( and is therefor wrong, because the initial declaration was wrong in the first place).
I can understand your frustration because many windows units in Pascal rely on signed types where they should have been unsigned.
This is rather common. You found a correct solution: assign to a longint if an API unit expects a longint. In this case it is an API bug....