Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_W32_SetCommMask
Return to Introduction  Previous page  Next page
This function specifies events that the device has to monitor.

BOOL
FT_W32_SetCommMask
(FT_HANDLE ftHandle, DWORD dwMask)




Parameters
ftHandle
Handle of the device.
dwMask
Mask containing aevents that the device has to monitor. This can be a combination of the following:
EV_BREAK  
BREAK condition detected  
EV_CTS  
Change in Clear to Send (CTS)  
EV_DSR  
Change in Data Set Ready (DSR)  
EV_ERR  
Error in line status  
EV_RING  
Ring Indicator (RI) detected  
EV_RLSD  
Change in Receive Line Signal Detect (RLSD)  
EV_RXCHAR  
Character received  
EV_RXFLAG  
Event character received  
EV_TXEMPTY  
Transmitter empty  




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



Remarks
This function specifies the events that the device should monitor. An application can call the function FT_W32_WaitCommEvent to wait for an event to occur.


Example
This example shows how to monitor changes in the modem status lines DSR and CTS.

FT_HANDLE ftHandle; // setup by FT_W32_CreateFile
DWORD dwMask = EV_CTS | EV_DSR;

if (!FT_W32_SetCommMAsk(ftHandle,dwMask))
  ; // FT_W32_SetCommMask failed
else
  ; // FT_W32_SetCommMask OK