网站首页  词典首页

请输入您要查询的函数:

 

术语 getnumberofconsoleinputevents
释义 GetNumberOfConsoleInputEvents
语法:
C++
BOOL WINAPI GetNumberOfConsoleInputEvents(
__in HANDLE hConsoleInput,
__out LPDWORD lpcNumberOfEvents
);
GetNumberOfConsoleInputEvents功能
检索数量在控制台的输入缓冲区未读输入记录。
参数
hConsoleInput [in]
句柄到控制台输入缓冲区。句柄必须有GENERIC_READ访问的权利。有关更多信息,参见控制台缓冲区安全和访问权限。
lpcNumberOfEvents [out]
一个变量,它接收未读输入记录在控制台的输入缓冲区数的指针。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该GetNumberOfConsoleInputEvents报告的功能在输入缓冲区读输入记录共包括键盘,鼠标的人数,和窗口大小输入记录。过程使用了ReadFile或ReadConsole功能只能读取键盘输入。过程使用ReadConsoleInput功能可以读取所有记录的输入类型。
一个进程可以指定一个控制台输入缓冲区的处理函数来确定等待当有未读的控制台输入之一。当输入缓冲区不为空,在控制台输入缓冲区处理国家发出信号。
读取控制台不影响读输入缓冲区中的记录数,使用PeekConsoleInput函数的输入记录。放弃在控制台的输入缓冲器,使用FlushConsoleInputBuffer函数所有未读的记录。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWincon.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
控制台函数
FlushConsoleInputBuffer
低级别控制台输入功能
PeekConsoleInput
ReadConsole
ReadConsoleInput
ReadFile
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetNumberOfConsoleInputEvents Function
Retrieves the number of unread input records in the console's input buffer.
Syntax
C++
BOOL WINAPI GetNumberOfConsoleInputEvents(
__in HANDLE hConsoleInput,
__out LPDWORD lpcNumberOfEvents
);
Parameters
hConsoleInput [in]
A handle to the console input buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights .
lpcNumberOfEvents [out]
A pointer to a variable that receives the number of unread input records in the console's input buffer.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The GetNumberOfConsoleInputEvents function reports the total number of unread input records in the input buffer, including keyboard, mouse, and window-resizing input records. Processes using the ReadFile or ReadConsole function can only read keyboard input. Processes using the ReadConsoleInput function can read all types of input records.
A process can specify a console input buffer handle in one of the wait functions to determine when there is unread console input. When the input buffer is not empty, the state of a console input buffer handle is signaled.
To read input records from a console input buffer without affecting the number of unread records, use the PeekConsoleInput function. To discard all unread records in a console's input buffer, use the FlushConsoleInputBuffer function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWincon.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Console Functions
FlushConsoleInputBuffer
Low-Level Console Input Functions
PeekConsoleInput
ReadConsole
ReadConsoleInput
ReadFile
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683207(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:22:23