Hi all, i'm trying to get some help again: I'm working on a little application for serial data transfer (actually only strings transfer) between 2 pc. My problem is to make work an autoreceive routine to receive continuosly characters and put them in an edit box. I'm trying in this way: when i enable autoreceive i call continuosly at every MessageLoop the following function:

;           AutoReceive Function

AutoRX:   call  ReadFile,FileHndle,Pointer,1,offset Read, offset ovl
          inc   Pointer
          call  SetWindowTextA,E120,offset RecBuffer
          call  SendMessageA,E120,000Fh,0,0
          ret  

but in this way i have a block of the process ! If any suggestions ... many thanks. Angelo
Posted on 2001-03-22 16:43:00 by angelo
you should only try to receive data if there really IS data present... i don't know how to deal with serial connections but i would setup a timer (say 1 sec) - everytime a timerevent is in your quene the prog should look for something like a "data is present" byte, if there is one it should send a "receive data" byte back and create a thread which receives all the data until a "data end" byte is there. or try to onyly create ONE thread which loops your get_char function all the time, now it does the same job but without blocking your process. only a suggestion, good luck, bye :) This message was edited by drcmda, on 3/22/2001 7:04:43 PM
Posted on 2001-03-22 18:02:00 by drcmda
thanks again drcmda
Posted on 2001-03-23 01:08:00 by angelo