网站首页  词典首页

请输入您要查询的函数:

 

术语 clearcommerror
释义 ClearCommError
语法:
C++
BOOL WINAPI ClearCommError(
__in HANDLE hFile,
__out_opt LPDWORD lpErrors,
__out_opt LPCOMSTAT lpStat
);
ClearCommError函数
检索信息通信错误和报告的通信设备的当前状态。该函数被调用时通讯错误发生,并且它清除设备的错误标志,使更多的输入和输出(I / O)操作。
参数
hFile [in]
一个句柄,通信设备。 CreateFile函数返回此句柄。
lpErrors [指出,可选]
一个变量,它接收面具标明错误类型的指针。此参数可以是一个或多个下列值。
ValueMeaning
CE_BREAK
0x0010The硬件检测休息条件。
CE_FRAME
0x0008The制定硬件检测到错误。
CE_OVERRUN
0x0002A字符缓冲区溢出发生。下一个字符将丢失。
CE_RXOVER
0x0001An输入缓冲区溢出发生。 ,或没有在输入缓冲区,或字符房间后的文件(EOF)字元月底收到。
CE_RXPARITY
0x0004The硬件检测到奇偶校验错误。
下面的值是不支持:
CE_DNS
CE_IOE
CE_MODE
CE_OOP
CE_PTO
CE_TXFULL
lpStat [指出,可选]
如果一COMSTAT结构,使设备的状态信息返回的指针。如果该参数为NULL,没有状态信息返回。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果一个通信端口已成立一个对二氯苯的设置结构,通信软件将终止所有的读写操作的通信端口通信时发生错误fAbortOnError成员TRUE值。没有新的读或写操作将接受申请承认,直到通过调用ClearCommError函数通信错误。
该ClearCommError函数填充缓冲区的地位所指出的由hFile参数指定的通信设备的现状lpStat参数。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
ClearCommBreak
通讯功能
通信资源
COMSTAT
CreateFile
二氯苯
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==ClearCommError Function
Retrieves information about a communications error and reports the current status of a communications device. The function is called when a communications error occurs, and it clears the device's error flag to enable additional input and output (I/O) operations.
Syntax
C++
BOOL WINAPI ClearCommError(
__in HANDLE hFile,
__out_opt LPDWORD lpErrors,
__out_opt LPCOMSTAT lpStat
);
Parameters
hFile [in]
A handle to the communications device. The CreateFile function returns this handle.
lpErrors [out, optional]
A pointer to a variable that receives a mask indicating the type of error. This parameter can be one or more of the following values.
ValueMeaning
CE_BREAK
0x0010The hardware detected a break condition.
CE_FRAME
0x0008The hardware detected a framing error.
CE_OVERRUN
0x0002A character-buffer overrun has occurred. The next character is lost.
CE_RXOVER
0x0001An input buffer overflow has occurred. There is either no room in the input buffer, or a character was received after the end-of-file (EOF) character.
CE_RXPARITY
0x0004The hardware detected a parity error.

The following values are not supported:
CE_DNS
CE_IOE
CE_MODE
CE_OOP
CE_PTO
CE_TXFULL
lpStat [out, optional]
A pointer to a COMSTAT structure in which the device's status information is returned. If this parameter is NULL, no status information is returned.
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
If a communications port has been set up with a TRUE value for the fAbortOnError member of the setup DCB structure, the communications software will terminate all read and write operations on the communications port when a communications error occurs. No new read or write operations will be accepted until the application acknowledges the communications error by calling the ClearCommError function.
The ClearCommError function fills the status buffer pointed to by the lpStat parameter with the current status of the communications device specified by the hFile parameter.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
ClearCommBreak
Communications Functions
Communications Resources
COMSTAT
CreateFile
DCB
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363180(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:28