KsGetCommModemStatus

The availability of this function depends on what the device supports.

Retrieves the modem control-register values.

Syntax

BOOL KsGetCommModemStatus(
     HANDLE hFile,
     LPDWORD lpModemStat
);

Parameters

hFile: a handle to the communications device. The KsCreateComm function returns this handle.

lpModemStat: 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 Description

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.

Return value

If the function succeeds, it returns TRUE, otherwise FALSE. To get extended error information, call GetLastError.

Example

N/A

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header kscom.h kscom.h
Library KsApi_Rtss.lib ksapi.h

See also

KsCreateComm