Hello
I am using a serial port to communicate with an embedded device. I am using CreateFile, WriteFile & ReadFile. It all works great until I run a VB6 application that uses the serial port. After I run the VB6 application, the ReadFile no longer waits for a character, it simply falls through. If I open HyperTerm and close it, again my app works.
CreateFile, GetCommState, SetupComm, SetCommState & PurgeComm all return successfully. Any ideas
Thanks
Pete
William DePalo [MVP VC++] - 04 May 2004 23:33 GMT
> I am using a serial port to communicate with an
> embedded device. I am using CreateFile, WriteFile
[quoted text clipped - 3 lines]
> a character, it simply falls through. If I open
> HyperTerm and close it, again my app works.
> CreateFile, GetCommState, SetupComm, SetCommState & PurgeComm all return successfully. Any ideas?
I would suggest that you take a look at SetCommTimeouts(), too.
If that fails you, I'd double check the return codes from each of the
functions. It seems as though one or more may have no effect and that
HyperTerminal is actually setting the prort's state.
Regards.
Will
PeteC - 05 May 2004 03:26 GMT
Will
You know, I hate how obvious things are once you find the problem
Thanks
Pete