Skip to content

Latest commit

 

History

History
152 lines (121 loc) · 3.78 KB

nf-winbase-getcommmodemstatus.md

File metadata and controls

152 lines (121 loc) · 3.78 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winbase.GetCommModemStatus
GetCommModemStatus function (winbase.h)
Retrieves the modem control-register values.
GetCommModemStatus
GetCommModemStatus function
MS_CTS_ON
MS_DSR_ON
MS_RING_ON
MS_RLSD_ON
_win32_getcommmodemstatus
base.getcommmodemstatus
winbase/GetCommModemStatus
base\getcommmodemstatus.htm
base
937bb623-d02d-452e-a8a2-21d9a6c5cac0
12/05/2018
GetCommModemStatus, GetCommModemStatus function, MS_CTS_ON, MS_DSR_ON, MS_RING_ON, MS_RLSD_ON, _win32_getcommmodemstatus, base.getcommmodemstatus, winbase/GetCommModemStatus
winbase.h
Windows.h
Windows
Windows XP [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Kernel32.lib
Kernel32.dll
Windows
19H1
GetCommModemStatus
winbase/GetCommModemStatus
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-comm-l1-1-0.dll
KernelBase.dll
API-MS-Win-DownLevel-Kernel32-l1-1-0.dll
MinKernelBase.dll
GetCommModemStatus

GetCommModemStatus function

-description

Retrieves the modem control-register values.

-parameters

-param hFile [in]

A handle to the communications device. The CreateFile function returns this handle.

-param 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.

Value Meaning
MS_CTS_ON
0x0010
The CTS (clear-to-send) signal is on.
MS_DSR_ON
0x0020
The DSR (data-set-ready) signal is on.
MS_RING_ON
0x0040
The ring indicator signal is on.
MS_RLSD_ON
0x0080
The RLSD (receive-line-signal-detect) signal is on.

-returns

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.

-see-also

Communications Functions

Communications Resources

CreateFile

WaitCommEvent