GetCommModemStatus
This function retrieves modem control-register values.
BOOL GetCommModemStatus(
HANDLE hFile,
LPDWORD lpModemStat);
Parameters
- hFile
[in] Handle to the communication device. The CreateFile function returns this handle. - lpModemStat
[out] Long pointer to a 32-bit variable that specifies the current state of the modem control-register values. This parameter can be a combination of the following values:Value Description MS_CTS_ON The CTS (Clear To Send) signal is on. MS_DSR_ON The DSR (Data Set Ready) signal is on. MS_RING_ON The ring indicator signal is on. MS_RLSD_ON The RLSD (Receive Line Signal Detect) signal is on.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error data, call GetLastError.
Remarks
The GetCommModemStatus function is useful when using the WaitCommEvent function to monitor the CTS, DSR, 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
| Runs On | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 1.0 and later | Winbase.h | Serdev.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
CreateFile, GetLastError, WaitCommEvent
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.