Yes, I ran a number of tests and found various high bits were set in 64 bit mode (Vista 64bit).
If you change the return type for GetAsyncKeyState to short, the compiler will sign-extend the 16 bits to 64 bits as it should, and the high bits will be overwritten.
Then there is no need to apply a bitmask. (Still needed if using MinWin)
I checked this with 'FileTest' and without this modification the program locks into a loop
Charles
PS: This does not apply to your libraries Peter but I had to make an adjustment for functions returning shorts or bytes, treated as booleans thus:
while GetAsyncKeyState(27)
wend
while not GetAsyncKeyState(27)
wend
On my latest update now, this mode of expression will work correctly for 64 bit binaries.