[Mingw-users] MinGW ReadFile

Zurück zum Archiv-Index
Kat Kaz****@t-tec*****
Mon Dec 17 15:18:21 JST 2018


I support legacy software that uses MinGW. I have been experiencing an 
interesting issue on a specific computer. Only happens on that computer. 
It runs Windows 7 64 bit.

I use Codeblocks and today I updated my MinGW to see if that solved the 
issue. It doesn't.

***Issue***

I send a command via WriteFile to a device. This works just fine. The 
device then starts returning data in multiple packets which I read 
asynchronously using ReadFile(). I can use big hefty sleeps to prevent 
access to the buffer during input. The corruption still happens.

On all computers running Windows 10 this works fine.

On this specific computer, some of the first bytes of a packet (I've 
never seen it happen to the first packet) becomes corrupted.

****

The only thing I can think of is that the ReadFile call itself is 
somehow corrupting the data as it comes in (sometimes). Is this possible?

Since I use MinGW, I thought I would ask here first. Any ideas as to 
where I should be looking for my problem?

Kat



More information about the MinGW-Users mailing list
Zurück zum Archiv-Index