Closed rlabrecque closed 7 years ago
The FieldOffset for the union must be 8 instead of 4 on x64.
https://github.com/AArnott/pinvoke/blob/3ed1db34699c1d836f4db735f13c7dfe4617c900/src/User32.Desktop/User32%2BINPUT.cs
Other sources/explanations: http://www.pinvoke.net/default.aspx/Structures/INPUT.html https://social.msdn.microsoft.com/Forums/en-US/69e5529e-372b-4d70-bb94-556507a2358e/sendinput-vs-windows-7-x64-rc-build-7000-not-working?forum=Vsexpressvb
Wow. The MSDN docs make it look so much like it's always at 4 bytes offset. Very insightful that observation about memory alignment.
The FieldOffset for the union must be 8 instead of 4 on x64.
https://github.com/AArnott/pinvoke/blob/3ed1db34699c1d836f4db735f13c7dfe4617c900/src/User32.Desktop/User32%2BINPUT.cs
Other sources/explanations: http://www.pinvoke.net/default.aspx/Structures/INPUT.html https://social.msdn.microsoft.com/Forums/en-US/69e5529e-372b-4d70-bb94-556507a2358e/sendinput-vs-windows-7-x64-rc-build-7000-not-working?forum=Vsexpressvb