Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_W32_GetCommModemStatus
Return to Introduction  Previous page  Next page
This function gets the current modem control value.

BOOL
FT_W32_GetCommModemStatus
(FT_HANDLE ftHandle, LPDWORD lpdwStat)




Parameters
ftHandle
Handle of the device.
lpdwStat
Pointer to a variable to contain modem control value. The modem control value can be a combination of the following:
MS_CTS_ON  
Clear to Send (CTS) is on  
MS_DSR_ON  
Data Set Ready (DSR) is on  
MS_RING_ON  
Ring Indicator (RI) is on  
MS_RLSD_ON  
Receive Line Signal Detect (RLSD) is on  




Return Value
If the function is successful, the return value is nonzero.
If the function is unsuccessful, the return value is zero.


Example
This example shows how to use this function.

FT_HANDLE ftHandle; // setup by FT_W32_CreateFile
DWORD dwStatus;

if (FT_W32_GetCommModemStatus(ftHandle,&dwStatus)) {
  // FT_W32_GetCommModemStatus ok
  if (dwStatus & MS_CTS_ON)
    ; // CTS is on
  if (dwStatus & MS_DSR_ON)
    ; // DSR is on
  if (dwStatus & MS_RI_ON)
    ; // RI is on
  if (dwStatus & MS_RLSD_ON)
    ; // RLSD is on
}
else
  ; // FT_W32_GetCommModemStatus failed