Latest Win32api.inc declares GetKeyState function as INTEGER. Should
be LONG. I know Win32.hlp says "SHORT", but the function returns the
states as LOWRD/HIWRD, not LOBYT/HIBYT, so Win32.hlp is wrong there.
Tried with the new declare, but get same value back in both LOBYT/HIBYT.
Changed back to old declaration and get correct values in LOWRD/HIWRD.
So I think it should be:
And, in case someone else has gotten same problem: MoveMemory is now a sub,
declared with BYREF addresses "AS ANY". Has broken a lot of my code, but
found that one can use "BYVAL (x + y)", instead of previous simple "x + y".
Now all I have to do is to encapsulate the addresses with BYVAL(address) in
a couple of hundred places, where I have used MoveMemory ..
------------------
be LONG. I know Win32.hlp says "SHORT", but the function returns the
states as LOWRD/HIWRD, not LOBYT/HIBYT, so Win32.hlp is wrong there.
Tried with the new declare, but get same value back in both LOBYT/HIBYT.
Changed back to old declaration and get correct values in LOWRD/HIWRD.
So I think it should be:
Code:
DECLARE FUNCTION GetKeyState LIB "USER32.DLL" ALIAS "GetKeyState" (BYVAL nVirtKey AS LONG) AS LONG
declared with BYREF addresses "AS ANY". Has broken a lot of my code, but
found that one can use "BYVAL (x + y)", instead of previous simple "x + y".
Now all I have to do is to encapsulate the addresses with BYVAL(address) in
a couple of hundred places, where I have used MoveMemory ..
------------------
Comment