User32SendInput Method
Synthesizes keystrokes, mouse motions, and button clicks.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function SendInput (
nInputs As Integer,
pInputs As Input(),
cbSize As Integer
) As Integer
Dim nInputs As Integer
Dim pInputs As Input()
Dim cbSize As Integer
Dim returnValue As Integer
returnValue = User32.SendInput(nInputs,
pInputs, cbSize)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static int SendInput(
int nInputs,
[InAttribute] array<Input>^ pInputs,
int cbSize
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member SendInput :
nInputs : int *
pInputs : Input[] *
cbSize : int -> int
No code example is currently available or this language may not be supported.
- 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.
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.