Hello!
I communicate with different modules via com-port.I'm the master and they are slaves. They just answer me then I call them. But if they dont answere me.My program don't want to wait for ever. After a certain time I want to stop reading from the comport.Because in that case I want to send a new command on the comport insted.
How can I do that?
I use a command like this. Waits for 3 Bytes.
ReadFile(hCom, cBuffer, 3, &dwBytesRead, NULL);
But if I don't receiev 3 bytes I get stuck!
Best Regards
Mikael Brolin
I communicate with different modules via com-port.I'm the master and they are slaves. They just answer me then I call them. But if they dont answere me.My program don't want to wait for ever. After a certain time I want to stop reading from the comport.Because in that case I want to send a new command on the comport insted.
How can I do that?
I use a command like this. Waits for 3 Bytes.
ReadFile(hCom, cBuffer, 3, &dwBytesRead, NULL);
But if I don't receiev 3 bytes I get stuck!
Best Regards
Mikael Brolin