Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VC++ .net and serial communication

VC++ .net and serial communication

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    doneirik
    wrote on last edited by
    #1

    First of all I must say I´m quite new to C++ and advanced programming. I need to write an application that communicates with the serial port programming in Visual C++ .Net. I have downloaded a number of source files from codeproject, however I cannot compile it, (guess its something wrong with my settings etc) and I´m a little confused about the number of files that come with the projects and what they do... I was wondering if anybody had a sample program that communicates with the serial port (like only a .cpp file or two)....hm maybe it´s not even possible, but I´ll be happy for some comments on this as this serial comm is getting on my nerves :-) best regards doneirik

    S J 2 Replies Last reply
    0
    • D doneirik

      First of all I must say I´m quite new to C++ and advanced programming. I need to write an application that communicates with the serial port programming in Visual C++ .Net. I have downloaded a number of source files from codeproject, however I cannot compile it, (guess its something wrong with my settings etc) and I´m a little confused about the number of files that come with the projects and what they do... I was wondering if anybody had a sample program that communicates with the serial port (like only a .cpp file or two)....hm maybe it´s not even possible, but I´ll be happy for some comments on this as this serial comm is getting on my nerves :-) best regards doneirik

      S Offline
      S Offline
      Sujan Christo
      wrote on last edited by
      #2

      Hi, What error message r u getting. I had done serial comm in VC++. Have a look at the following link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp[^] it will surely help you Sujan

      1 Reply Last reply
      0
      • D doneirik

        First of all I must say I´m quite new to C++ and advanced programming. I need to write an application that communicates with the serial port programming in Visual C++ .Net. I have downloaded a number of source files from codeproject, however I cannot compile it, (guess its something wrong with my settings etc) and I´m a little confused about the number of files that come with the projects and what they do... I was wondering if anybody had a sample program that communicates with the serial port (like only a .cpp file or two)....hm maybe it´s not even possible, but I´ll be happy for some comments on this as this serial comm is getting on my nerves :-) best regards doneirik

        J Offline
        J Offline
        jmostei
        wrote on last edited by
        #3

        i wish i can send you a book through the net but it is still impossible if it is in phisical paper format ... I strongly recommend you ( if you find it ) "Advanced Programming on windows" by Jeffrey Richter. However if you arent such an adventure man and simply want to solve the problem by now, you have to find in the msdn the documentation about: CreateFile, WriteFile and ReadFile, and SetCommConfig. They are functions of windows api. Do not forget to include . With those four functions and a lot of error discovering efforts you will probably success in comunicating with serial port. I have done it before in my work but i dont have the code.:)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups