SendInput putting the system to sleep
<p>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.</p>

<pre><code>#include &lt;windows.h&gt;
#include &lt;winable.h&gt;

int main()
{
    INPUT joyInput;
    joyInput.type = INPUT_MOUSE;
    joyInput.mi.dx = 10;
    joyInput.mi.dwFlags = MOUSEEVENTF_MOVE;
    SendInput(1, &amp;joyInput, sizeof(INPUT));
    return 0;
}
</code></pre>

<p>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? </p>
