Serial Port
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Serial Port

  1. #1
    Join Date
    Apr 2007
    Posts
    20

    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

  2. #2
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    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
    In theory, there is no difference between theory and paractice; 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

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,610

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center