-
Serial Port
I wrote a program that communicates using the serial port using MFC. For some reason, sometimes it works fine, but other times, it doesn't. Oddly enough, for those times that it doesn't connect, if I open a connection using hyperterminal, then close it, then try again with my program, then it works fine. Does anyone have a clue what I'm doing wrong?
Thanks beforehand
-
Re: Serial Port
Not without you posting a MINIMAL yet complete piece of code. Once you strip out every line that has nothing to do with the problem, and have a small single file program that reproduces the error, post it here (be sure tio properly use code tags!!!!)
Over 80% of the time, when a person is reducing down the problem, they realize what thte problem actually is.
-
Re: Serial Port
I agree with TheCPUWizard.
I would also add that if you wrote this code "from scratch" then you could forget some very important things.
So try to rewrite it using very useful example from Joe Newcomer's essay Serial Port programming