Export (0) Print
Expand All

GetCommModemStatus (Windows CE 5.0)

Windows CE 5.0
Send Feedback

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.

The following are values for this parameter.

ValueDescription
MS_CTS_ONThe CTS (Clear To Send) signal is on.
MS_DSR_ONThe DSR (Data Set Ready) signal is on.
MS_RING_ONThe ring indicator signal is on.
MS_RLSD_ONThe RLSD (Receive Line Signal Detect) signal is on.

Return Values

Nonzero indicates success.

Zero indicates failure.

To obtain extended error data, call the GetLastError function.

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

OS Versions: Windows CE 1.0 and later.
Header: Winbase.h.
Link Library: Serdev.lib.

See Also

CreateFile | WaitCommEvent


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft