When I add the following lines to my code
[DllImport("user32.dll")] static extern void keybd_event(byte key, byte scan, int flags, int extraInfo);
and do some code analysis regarding the basic Microsoft correctness rules, I get warning CA1901. In principle, he complains that the 4th parameter int extraInfo works fine on a 32-bit platform, but it is expected that a 64-bit integer type is expected on a 64-bit platform.
When I modified the code in long extraInfo, the requirements for the 64-bit platform are satisfied, but the 32-bit platform expects a 32-bit integer.
How to solve this dilemma without suppressing a warning?
Jacob source share