网站首页  词典首页

请输入您要查询的函数:

 

术语 getcommmask
释义 GetCommMask
语法:
C++
BOOL WINAPI GetCommMask(
__in HANDLE hFile,
__out LPDWORD lpEvtMask
);
GetCommMask功能
检索值指定通信设备的事件掩码。
参数
hFile [in]
一个句柄,通信设备。 CreateFile函数返回此句柄。
lpEvtMask [out]
一个指针变量接收的事件掩码,目前启用。此参数可以是一个或多个下列值。
ValueMeaning
EV_BREAK
0x0040A打破上检测输入。
EV_CTS
0x0008The中旅(明确到发送)改变了状态的信号。
EV_DSR
0x0010The DSR(数据设置就绪)信号改变状态。
EV_ERR
0x0080A线状态错误发生。线路状态错误CE_FRAME,CE_OVERRUN和CE_RXPARITY。
EV_EVENT1
0x0800An事件的第一供应商的特定类型的发生。
EV_EVENT2
0x1000An事件第二供应商的特定类型的发生。
EV_PERR
0x0200A打印机错误发生。
EV_RING
0x0100A环指标检测。
EV_RLSD
0x0020The RLSD(接收线信号检测)信号改变状态。
EV_RX80FULL
0x0400The接收缓冲区充满百分之八十。
EV_RXCHAR
0x0001A的性质是接获和输入缓冲区内。
EV_RXFLAG
0x0002The事件的性质是接获和输入缓冲区内。事件中指定的字符设备的DCB结构,适用于使用SetCommState函数到串行端口。
EV_TXEMPTY
0x0004The在输出缓冲区的最后一个字符被送往。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该GetCommMask函数使用一个掩码变量来表示,可用于特定的通信资源监测事件。一个句柄,通信资源,可以在调用中指定的WaitCommEvent功能,为一个等待事件发生。要修改的通信资源的事件掩码,使用SetCommMask功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
通讯功能
通信资源
CreateFile
二氯苯
SetCommMask
WaitCommEvent
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==GetCommMask Function
Retrieves the value of the event mask for a specified communications device.
Syntax
C++
BOOL WINAPI GetCommMask(
__in HANDLE hFile,
__out LPDWORD lpEvtMask
);
Parameters
hFile [in]
A handle to the communications device. The CreateFile function returns this handle.
lpEvtMask [out]
A pointer to the variable that receives a mask of events that are currently enabled. This parameter can be one or more of the following values.
ValueMeaning
EV_BREAK
0x0040A break was detected on input.
EV_CTS
0x0008The CTS (clear-to-send) signal changed state.
EV_DSR
0x0010The DSR (data-set-ready) signal changed state.
EV_ERR
0x0080A line-status error occurred. Line-status errors are CE_FRAME, CE_OVERRUN, and CE_RXPARITY.
EV_EVENT1
0x0800An event of the first provider-specific type occurred.
EV_EVENT2
0x1000An event of the second provider-specific type occurred.
EV_PERR
0x0200A printer error occurred.
EV_RING
0x0100A ring indicator was detected.
EV_RLSD
0x0020The RLSD (receive-line-signal-detect) signal changed state.
EV_RX80FULL
0x0400The receive buffer is 80 percent full.
EV_RXCHAR
0x0001A character was received and placed in the input buffer.
EV_RXFLAG
0x0002The event character was received and placed in the input buffer. The event character is specified in the device's DCB structure, which is applied to a serial port by using the SetCommState function.
EV_TXEMPTY
0x0004The last character in the output buffer was sent.

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 GetCommMask function uses a mask variable to indicate the set of events that can be monitored for a particular communications resource. A handle to the communications resource can be specified in a call to the WaitCommEvent function, which waits for one of the events to occur. To modify the event mask of a communications resource, use the SetCommMask function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Communications Functions
Communications Resources
CreateFile
DCB
SetCommMask
WaitCommEvent
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363257(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 13:18:47