Prev Next

SendInput info  Overview  Group

[New for Windows NT 4.0 Service Pack 3.]

The SendInput function synthesizes keystrokes, mouse motions, and button clicks.

UINT SendInput(

    UINT nInputs,

// count of input events

    LPINPUT pInputs,

// array of input events to insert

    int cbSize

// size of an INPUT structure

   );

Parameters

nInputs
Specifies how many structures pInputs points to.
pInputs
Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the keyboard or mouse input stream.
cbSize
Specifies the size of an INPUT structure. If cbSize is not the size of an INPUT structure, the function will fail.

Return Values

The function returns the number of events that it successfully inserted into the keyboard or mouse input stream.

To get extended error information, call GetLastError.

Remarks

The SendInput function inserts the events in the INPUT structures serially into the keyboard or mouse input stream. These events aren’t interspersed with other keyboard or mouse input events inserted either by the user (with the keyboard or mouse) or by calls to keybd_event, mouse_event, or other calls to SendInput.

See Also

INPUT, keybd_event, mouse_event