网站首页  词典首页

请输入您要查询的函数:

 

术语 setcommmask
释义 SetCommMask
语法:
C++
BOOL WINAPI SetCommMask(
__in HANDLE hFile,
__in DWORD dwEvtMask
);
SetCommMask函数
指定一组事件进行监测的通信设备。
参数
hFile [in]
一个句柄,通信设备。 CreateFile函数返回此句柄。
dwEvtMask [in]
该事件被启用。为零禁用所有事件的价值。此参数可以是一个或多个下列值。
ValueMeaning
EV_BREAK
0x0040A打破上检测输入。
EV_CTS
0x0008The中旅(明确到发送)改变了状态的信号。
EV_DSR
0x0010The DSR(数据设置就绪)信号改变状态。
EV_ERR
0x0080A线状态错误发生。线路状态错误CE_FRAME,CE_OVERRUN和CE_RXPARITY。
EV_RING
0x0100A环指标检测。
EV_RLSD
0x0020The RLSD(接收线信号检测)信号改变状态。
EV_RXCHAR
0x0001A的性质是接获和输入缓冲区内。
EV_RXFLAG
0x0002The事件的性质是接获和输入缓冲区内。事件中指定的字符设备的DCB结构,适用于使用SetCommState函数到串行端口。
EV_TXEMPTY
0x0004The在输出缓冲区的最后一个字符被送往。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该SetCommMask函数指定的,可用于特定的通信资源监测事件。一个句柄,通信资源,可以在调用中指定的WaitCommEvent功能,为一个等待事件发生。要获得通信资源当前事件掩码,使用GetCommMask功能。
实例
有关示例,请参阅监视通信事件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
通讯功能
通信资源
CreateFile
二氯苯
GetCommMask
SetCommState
WaitCommEvent
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetCommMask Function
Specifies a set of events to be monitored for a communications device.
Syntax
C++
BOOL WINAPI SetCommMask(
__in HANDLE hFile,
__in DWORD dwEvtMask
);
Parameters
hFile [in]
A handle to the communications device. The CreateFile function returns this handle.
dwEvtMask [in]
The events to be enabled. A value of zero disables all events. 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_RING
0x0100A ring indicator was detected.
EV_RLSD
0x0020The RLSD (receive-line-signal-detect) signal changed state.
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 SetCommMask function specifies 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 get the current event mask of a communications resource, use the GetCommMask function.
Examples
For an example, see Monitoring Communications Events .
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
GetCommMask
SetCommState
WaitCommEvent
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363435(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:15:28