User32SendInput Method

Synthesizes keystrokes, mouse motions, and button clicks.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static int SendInput(
	int nInputs,
	Input[] pInputs,
	int cbSize
)

Parameters

nInputs  Int32
The number of structures in the pInputs array.
pInputs  Input
An array of Input structures.

Each structure represents an event to be inserted into the keyboard or mouse input stream.

cbSize  Int32
The size, in bytes, of an Input structure.

If cbSize is not the size of an Input structure, the function fails.

Return Value

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

If the function returns zero, the input was already blocked by another thread.

Remarks

See Also