Exactly.
Pointers in 64-bit processors are 8 bytes long instead of 4 bytes.
A new type was added to AutoHotkey_L (ptr) that represents a pointer. It can also be used for size_t parameters.
There's also A_PtrSize.
My attempt at a 32-bit/64-bit compatible version of the script:
Code:
hSynTP := DllCall("CreateFile", "Str", "\\.\SYNTP", "UInt", 0xC0000000, "UInt", 3, "ptr", 0, "UInt", 3, "UInt", 80, "ptr", 0, "ptr")
InBuf := DllCall("GlobalAlloc", "UInt", 0x40, "ptr", 16, "ptr")
OutBuf := DllCall("GlobalAlloc", "UInt", 0x40, "ptr", 8, "ptr")
NumPut(0x01000000 | 10, InBuf + A_PtrSize * 0, 0, "ptr")
NumPut(0x01000000 | 729, InBuf + A_PtrSize * 1, 0, "ptr")
NumPut((~0) - 1, InBuf + A_PtrSize * 3, "ptr")
DllCall("DeviceIoControl", "ptr", hSynTP, "UInt", 0x80006004, "ptr", InBuf, "UInt", 16, "ptr", OutBuf, "UInt", 8, "ptr", 0, "ptr", 0)
TouchPad := NumGet(OutBuf + 1) > 0
MsgBox % TouchPad
The next version will make ptr the default type for NumPut() and NumGet() to ease porting (ex: COM.ahk because of some still useful functions like COM_QueryInterface).