dotnet / pinvoke

A library containing all P/Invoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.
MIT License
2.11k stars 220 forks source link

User32+MOUSEINPUT.cs has the wrong type for mouseData #610

Closed Cpt-Falcon closed 1 year ago

Cpt-Falcon commented 1 year ago

mouse data struct is defined as a uint but in reality it should be an int. The documentation even says for things like mouse wheel it needs to be a negative number. In order to get around this you have to do uint.MaxValue - constant such that when it gets passed to the underlying function it overflows and becomes a negative int.