网站首页  词典首页

请输入您要查询的函数:

 

术语 sendinput
释义 SendInput
语法:
UINT SendInput( UINT nInputs,
LPINPUT pInputs,
int cbSize
);
SendInput函数
该SendInput函数综合按键,滑鼠的动作,和按钮点击。
参数
nInputs
[in]的结构,数量在pInputs数组。
pInputs
[in]指向一个输入结构的数组。每个结构是一个事件被纳入键盘或鼠标输入流中。
cbSize
[in]指定的大小,以字节为单位,一个输入结构。如果cbSize不是一个输入结构的大小,功能失败。
返回值
该函数返回的事件数,它成功地将键盘或鼠标输入流中。如果该函数返回零,输入已阻止另一个线程。为了获得更多错误信息,调用GetLastError。
微软Windows Vista。这个函数失败时,它是由用户界面特权隔离(UIPI)阻止。请注意,无论GetLastError函数返回值也将说明故障是由UIPI造成的阻塞。
备注
微软Windows Vista。这一功能受到UIPI。申请只允许注入到应用程序中,在同等或较低完整性级别的投入。
该SendInput函数插入INPUT结构中的事件连续到键盘或鼠标输入流。这些事件不夹杂其他键盘或鼠标输入事件插入用户(使用键盘或鼠标)或电话要么keybd_event,mouse_event或SendInput其他要求。
此函数不重置键盘的当前状态。任何已经按下时调用函数可能会干扰的事件,这个函数生成键。为了避免这个问题,请向GetAsyncKeyState功能键盘的状态和正确必要的。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低经营systemsWindows XP中,Windows NT 4.0的Service Pack 3中
参见
键盘输入,输入,GetAsyncKeyState,keybd_event,mouse_event
==英文原文==SendInput Function
The SendInput function synthesizes keystrokes, mouse motions, and button clicks.
Syntax
UINT SendInput( UINT nInputs,
LPINPUT pInputs,
int cbSize
);
Parameters
nInputs
[in] Number of structures in the pInputs array.
pInputs
[in] Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the keyboard or mouse input stream.
cbSize
[in] Specifies the size, in bytes, of an INPUT structure. If cbSize is not the size of an INPUT structure, the function fails.
Return Value
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 GetLastError .
Microsoft Windows Vista. This function fails when it is blocked by User Interface Privilege Isolation (UIPI). Note that neither GetLastError nor the return value will indicate the failure was caused by UIPI blocking.
Remarks
Microsoft Windows Vista. This 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 INPUT 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 keybd_event , mouse_event , 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 GetAsyncKeyState function and correct as necessary.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows XP, Windows NT 4.0 Service Pack 3
See Also
Keyboard Input , INPUT , GetAsyncKeyState , keybd_event , mouse_event
==原始网址==http://msdn.microsoft.com/en-us/library/ms646310(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:23:24