网站首页  词典首页

请输入您要查询的函数:

 

术语 getcommmodemstatus
释义 GetCommModemStatus
语法:
C++
BOOL WINAPI GetCommModemStatus(
__in HANDLE hFile,
__out LPDWORD lpModemStat
);
GetCommModemStatus功能
检索调制解调器控制寄存器的值。
参数
hFile [in]
一个句柄,通信设备。 CreateFile函数返回此句柄。
lpModemStat [out]
一个变量,它接收的调制解调器控制的现状指针寄存器的值。此参数可以是一个或多个下列值。
ValueMeaning
MS_CTS_ON
0x0010The中旅(明确到发送)信号的。
MS_DSR_ON
0x0020The DSR(数据设置就绪)信号的。
MS_RING_ON
0x0040The环指标的信号。
MS_RLSD_ON
0x0080The RLSD(接收线信号检测)信号的。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该GetCommModemStatus功能非常有用当您使用WaitCommEvent功能监测中旅,RLSD,DSR,或环形指示器信号。为了检测到这些信号改变状态,使用WaitCommEvent,然后使用更改后GetCommModemStatus确定状态发生。
函数失败如果硬件不支持的控制寄存器的值。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
通讯功能
通信资源
CreateFile
WaitCommEvent
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==GetCommModemStatus Function
Retrieves the modem control-register values.
Syntax
C++
BOOL WINAPI GetCommModemStatus(
__in HANDLE hFile,
__out LPDWORD lpModemStat
);
Parameters
hFile [in]
A handle to the communications device. The CreateFile function returns this handle.
lpModemStat [out]
A pointer to a variable that receives the current state of the modem control-register values. This parameter can be one or more of the following values.
ValueMeaning
MS_CTS_ON
0x0010The CTS (clear-to-send) signal is on.
MS_DSR_ON
0x0020The DSR (data-set-ready) signal is on.
MS_RING_ON
0x0040The ring indicator signal is on.
MS_RLSD_ON
0x0080The RLSD (receive-line-signal-detect) signal is on.

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 GetCommModemStatus function is useful when you are using the WaitCommEvent function to monitor the CTS, RLSD, DSR, or ring indicator signals. To detect when these signals change state, use WaitCommEvent and then use GetCommModemStatus to determine the state after a change occurs.
The function fails if the hardware does not support the control-register values.
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
WaitCommEvent
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363258(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:25:37