全部博文(584)
分类: WINDOWS
2011-04-06 17:08:40
Synthesizes keystrokes, mouse motions, and button clicks.
SyntaxType: UINT
The number of structures in the pInputs array.
pInputs [in]Type: LPINPUT
An array of structures. Each structure represents an event to be inserted into the keyboard or mouse input stream.
cbSize [in]Type: int
The size, in bytes, of an structure. If cbSize is not the size of an INPUT structure, the function fails.
Return ValueType: UINT
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. To get extended error information, call .
This function fails when it is blocked by UIPI. Note that neither nor the return value will indicate the failure was caused by UIPI blocking.
RemarksThis function is subject to UIPI. Applications are permitted to inject input only into applications that are at an equal or lesser integrity level.
The SendInput function inserts the events in the structures serially into the keyboard or mouse input stream. These events are not interspersed with other keyboard or mouse input events inserted either by the user (with the keyboard or mouse) or by calls to , , or other calls to SendInput.
This function does not reset the keyboard's current state. Any keys that are already pressed when the function is called might interfere with the events that this function generates. To avoid this problem, check the keyboard's state with the function and correct as necessary.
Requirements
Minimum supported client | Windows 2000 Professional |
---|---|
Minimum supported server | Windows 2000 Server |
Header | Winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |