At 07:18 PM 1/16/98 +0100, you wrote: >hello everbody, > >my question is a little bit off topic (i gues) >but maybe somebody can point me to the right location (list or newsgroup) > >i have a made a program (c++) witch reads data from the serial port >a data device on com1 f.e. sends lots of data to my computer >the big problem in win95 is, while i'm receiving data, my program is blocked >(task switching) and when it receive's control, data is lost. >how can i solve this problem. i'm looking for some kind of blocking >procedure >to stop windows for task switching while my program receives data > >Kind Regards, >Rob Aerts There are a number of ways to deal with this. Windows95 is great because it supports multiple threads. You can simply instantiate a thread to do nothing but watch the serial port. It then notifies the rest of the program when it needs to do something. I suspect that you might be able to accomplish something similar with flow control, but that assumes that the device that your serial port is communicating with supports flow control. Given that this message is on the PIC list, I'll make the heroic assumption that you are communicating with a PIC. If that is the case, it seems to me you could use flow control, but it would involve more resources (code or pins) that you may not have available. So I would try using a dedicated thread.