I'm at a loss to explain this one. I'm trying to figure out the proper use of the SendInput function so I can directly manipulate the cursor on the screen, so for a basic test to see how things work, I made this short snippet that should move the cursor 10 pixels to the right. In theory.
However, in practice, the SendInput function is either putting my computer to sleep, or at least shutting off my monitors, which is certainly an unwanted effect! Commenting out that line prevents the issue from happening, but obviously I need it to perform the task. What am I doing wrong?
Well, since one functionality has no relation to the other, I can only assume your PC has a virus or some anti-cheat software that detours calls to SendInput() and performs the undesirable action. That is the only explanation I can come up with. Try the executable in a 100% clean PC (a Windows PC with nothing installed except Windows).