Is it a bug to pass a single-element array to SendInput?
Given the following code void foo() { INPUT input{}; input.type = INPUT_MOUSE; input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; SendInput(1, &input, sizeof(input)); input.mi.dwFlags = MOUSEEVENTF_LEFTUP; SendInput(1, &input, sizeof(input)); }; is it a bug to pass a single-element array to SendInput in consecutive calls? This seems to be perfectly supported by the documentation. Short answer: Maybe. Longer answer: It depends. To see what it depends on, and when this matters, it helps to understand, why SendInput was introduced into the Windows API: For one, it consolidates the keybd_event and mouse