Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetCommModemStatus

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function retrieves modem control-register values.


BOOL GetCommModemStatus(
  HANDLE hFile,
  LPDWORD lpModemStat
);

hFile

[in] Handle to the communication device, returned by the CreateFile function.

lpModemStat

[out] Long pointer to a 32-bit variable that specifies the current state of the modem control-register values. The following table shows possible values.

Value Description

MS_CTS_ON

The clear-to-send (CTS) signal is on.

MS_DSR_ON

The data-set-ready (DSR) signal is on.

MS_RING_ON

The ring indicator signal is on.

MS_RLSD_ON

The receive-line-signal-detect (RLSD) signal is on.

Nonzero indicates success. Zero indicates failure. To obtain extended error data, call the GetLastError function.

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.

Headerwinbase.h
LibrarySerdev.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft