December 25th, 2008, 10:33 PM
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?
December 25th, 2008, 10:38 PM
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.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code
outside of [code] ... [/code]
tags. See here
* How NOT
to post a question here
* Of course you read this
carefully before you posted
* Need homework help? Read this first
December 28th, 2008, 04:12 AM
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
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!