Article ID: 101417
Article Last Modified on 6/24/2004
CTS Clear To Send DSR Data Set Ready RI Ring Indicator RLSD Receive Line Signal Detect; Carrier Detect (CD)The RLSD signal is probably the most important (for modem software), and is often necessary. This article provides a method to obtain this information. Although this method is undocumented, it will be supported in future versions of 16-bit Windows.
#define COMM_MSRSHADOW 35
#define MSR_CTS 0x10 /* Absolute CTS state in MSR */
#define MSR_DSR 0x20 /* Absolute DSR state in MSR */
#define MSR_RI 0x40 /* Absolute RI state in MSR */
#define MSR_RLSD 0x80 /* Absolute RLSD state in MSR */
LPBYTE GetCommMSRShadow(short nCid)
{
/* Return far pointer to MSR shadow byte */
return (((LPBYTE)SetCommEventMask(nCid, 0)) + COMM_MSRSHADOW);
} /* GetCommMSRShadow */
Once this pointer is available, it can be used as follows:
lpMSRShadow = GetCommMSRShadow(nCid);
bRLSD = (*lpMSRShadow) & MSR_RLSD;
if (bRLSD)
/** RLSD is high **/
else
/** RLSD is low **/
Althought this method is supported in a Win32-based application, you should
use GetCommModemStatus() instead.
Additional query words: no32bit 3.00 3.10 DDKCOMM
Keywords: kb16bitonly KB101417