Okay,
I have found out that RLSD(Receive Line Signal Detect) is the same as CD(Carrier Detect). The problem now is that when I set off the DSR pin, it sets off the RLSD routine and the DSR routine. Here is a code snippet:
Play = DSR pin
Rewind = CD or RLSD pin
FFwd = CTS pin
Code:
// Specify a set of events to be monitored for the port.
SetCommMask (hPort, EV_CTS | EV_DSR | EV_RLSD
while (hPort != INVALID_HANDLE_VALUE)
{
// Wait for an event to occur for the port.
WaitCommEvent (hPort, &dwCommModemStatus, 0);
// Re-specify the set of events to be monitored for the port.
SetCommMask (hPort, EV_CTS | EV_DSR | EV_RLSD
// Retrieve modem control-register values.
if (dwCommModemStatus & EV_DSR)
MessageBox(NULL,"PLAY has been pressed on the footpedal","PLAY",MB_OK);
if (dwCommModemStatus & EV_RLSD)
MessageBox(NULL,"REWIND has been pressed on the footpedal","REWIND",MB_OK);
if (dwCommModemStatus & EV_CTS)
MessageBox(NULL,"FAST FORWARD has been pressed on the footpedal","FFORWARD",MB_OK);
GetCommModemStatus (hPort, &dwCommModemStatus);
}
Everything works correctly except for when I hit play. When I hit play, The first messagebox and the second messagebox both display. Anyone know why??????????????????????????
Thanks,
Kendal
PS Why would the code loop twice every time I hit one of the controls once?????????????? ex. I hit Rewind = Rewind messagebox pops up twice.