-
December 25th, 2008, 11:33 PM
#1
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
-
December 25th, 2008, 11:38 PM
#2
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!)
2008, 2009,2010
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 for instructions
* 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, 05:12 AM
#3
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
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|