15,471
社区成员
发帖
与我相关
我的任务
分享
UINT SendInput(
UINT nInputs,
LPINPUT pInputs,
int cbSize
);
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 number of events that the function inserted into the keyboard or mouse input stream indicates success. To get extended error information, call GetLastError.
INPUTSee Also
Keyboard Structures | keybd_event | MOUSEINPUT | KEYBDINPUT | mouse_event | SendInput
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Winuser.h.
This structure is used by the SendInput function to synthesize keystrokes, stylus and mouse motions, and button clicks.
typedef struct tagINPUT {
DWORD type;
union {
MOUSEINPUT mi;
KEYBDINPUT ki;
HARDWAREINPUT hi;
};
} INPUT, *PINPUT, FAR* LPINPUT;
Members
type
Indicates the type of device information this structure carries. It is one of the following values. Value Description
INPUT_HARDWARE The hi union member is valid.
INPUT_KEYBOARD The ki union member is valid.
INPUT_MOUSE The mi union member is valid.
mi
MOUSEINPUT structure that contains information about simulated mouse input.
ki
KEYBDINPUT structure that contains information about simulated keyboard input.
hi
HARDWAREINPUT structure that contains information about a simulated input device message.