I get PC blocked calling WriteFile un serial port in XP.
Someone know why?
THX B7
Someone know why?
THX B7
Bit7,
Not sure what you mean by 'PC blocked', but I'm using XP and
CreateFile, WriteFile, and ReadFile are working fine on the serial
ports. Not only do I see the results on the machines I'm connected to, but also w/ 'Portmon.exe' from sysinternals.com
Dave
Not sure what you mean by 'PC blocked', but I'm using XP and
CreateFile, WriteFile, and ReadFile are working fine on the serial
ports. Not only do I see the results on the machines I'm connected to, but also w/ 'Portmon.exe' from sysinternals.com
Dave
DaveTX47,
many thanks. This is a good start to say "problem is on my code".
I've write a little communication program.... Works great on 95-98.
On XP, pc seems to eneter into infinite loop (mouse arro change in wait.. icon) after a PurgeComm function.... I've try to skipped PurgeComm(rem) and now is the same at the following WriteFile function....
Probably there's something else not compatible on my code.....
Maybe i open the file in a wrong way.... but in 95 works good...
If you like to see, attached is the code.
Many thx B7
many thanks. This is a good start to say "problem is on my code".
I've write a little communication program.... Works great on 95-98.
On XP, pc seems to eneter into infinite loop (mouse arro change in wait.. icon) after a PurgeComm function.... I've try to skipped PurgeComm(rem) and now is the same at the following WriteFile function....
Probably there's something else not compatible on my code.....
Maybe i open the file in a wrong way.... but in 95 works good...
If you like to see, attached is the code.
Many thx B7
I never tried this under XP, but maybe ...
You use GetCommState to get an initial DCB structure for setting up new state.
Maybe, the initial state is wired under XP, try to setup an DCB with "BuildCommDCB".
Another problem may be writing a full buffer to the com port. I remember "darkly" some problems I had (during
programming an open command for a cash-drawer) with writing more than one byte at once.
My solution was to make a write loop, that wrote only one byte per WriteFile.
You use GetCommState to get an initial DCB structure for setting up new state.
Maybe, the initial state is wired under XP, try to setup an DCB with "BuildCommDCB".
Another problem may be writing a full buffer to the com port. I remember "darkly" some problems I had (during
programming an open command for a cash-drawer) with writing more than one byte at once.
My solution was to make a write loop, that wrote only one byte per WriteFile.
beaster,
many thanks, i will try.
many thanks, i will try.