@need4speed: So it looks like this would work for your script:
Code: Select all
hw_m_target := DllCall( "WindowFromPoint", "int64", ( m_y << 32 )|( m_x & 0xFFFFFFFF ), "ptr" )
I might write it slightly differently like this:
Code: Select all
hw_m_target := DllCall("WindowFromPoint", "int64",(m_x&0xFFFFFFFF)|(m_y<<32), "ptr")
;or:
hWnd := DllCall("WindowFromPoint", Int64,(vPosX&0xFFFFFFFF)|(vPosY<<32), Ptr)
[EDIT:] I tested the script and it worked, although I was concerned that
&0xFFFFFFF, might not work, if AHK tried to interpret
&0xFFFFFFF by attempting to retrieve the address of a variable called '0xFFFFFFFF'. I.e. so in theory putting spaces around the '&' might be safer.
==================================================
@just me:
Thanks so much just me, I finally have some understanding why there is a difference.
This affects my script:
DllCall converter/cleaner (e.g. x32 to x64/x32 two-way compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31365
it suggests that all scripts, for x64/x32 compatibility, should aim to have the same number of parameters as the definition specifies, and not split them up.
Btw you noticed a lot of flaws with that initial script, in case there any more. I didn't think the script was necessarily perfect at the time, but there were more issues than expected.
==================================================
I don't 100% understand what they're talking about here, although I can sort of follow, in case there is anywhere that explains this better.
Overview of x64 Calling Conventions
https://msdn.microsoft.com/en-us/library/ms235286.aspx
The __fastcall convention uses registers for the first four arguments and the stack frame to pass additional arguments.
Parameter Passing
https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx