Hello
I have this problem:
When I CReateFile("COM1",GENERIC_READ | GENERIC_WRITE,0,0,OPEN_EXISTING,0, 0);
I can WriteFile to that handle and it works fine. But when I do ReadFile(comhandle,buffer,1,&count,NULL), it functions just when sth is waiting there. When not, it waits for some data. How can I make the function working so, that it will read some data or return 0 READED when there is nothing instead of waiting? Can I use FILE_FLAG_OVERLAPPED somehow for this? Because when I use it, I can write and read once, but after it , it reads nothing (like when reading with nNumberOfBytesToRead setted to zero (for ReadFile).
Thanks
Bubak
I have this problem:
When I CReateFile("COM1",GENERIC_READ | GENERIC_WRITE,0,0,OPEN_EXISTING,0, 0);
I can WriteFile to that handle and it works fine. But when I do ReadFile(comhandle,buffer,1,&count,NULL), it functions just when sth is waiting there. When not, it waits for some data. How can I make the function working so, that it will read some data or return 0 READED when there is nothing instead of waiting? Can I use FILE_FLAG_OVERLAPPED somehow for this? Because when I use it, I can write and read once, but after it , it reads nothing (like when reading with nNumberOfBytesToRead setted to zero (for ReadFile).
Thanks
Bubak