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. Trouble with Serial programming in NT

Trouble with Serial programming in NT

Scheduled Pinned Locked Moved C / C++ / MFC
comhardwarehelpquestion
3 Posts 2 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.
  • G Offline
    G Offline
    generic_user_id
    wrote on last edited by
    #1

    I need to address the Serial (COM1) port on NT kernel based systems (NT4 and Win2k). I read the articles in the system section, but they don't seem to cover what I'm looking for. As I want to address some hardware I made myself, I need to have full control. I.E: I must be able to put DTR on high or low at will. The articles here assume baut-rate based comminucations are the way to go. I'd rather not use the DDK, I don't even have it. Suggestions? Ideas? I'm thinking about using the MSCOMM32 ActiveX control, but I'm not too happy with it. I've been looking into ::CreateFile. I can open the com port without trouble, but there isn't functionality for directly reading and writing to the port. Please help me out, thanks in advance and kind regards, Griffith


    Everything you say will be misquoted, ripped out of context and used against you.

    L 1 Reply Last reply
    0
    • G generic_user_id

      I need to address the Serial (COM1) port on NT kernel based systems (NT4 and Win2k). I read the articles in the system section, but they don't seem to cover what I'm looking for. As I want to address some hardware I made myself, I need to have full control. I.E: I must be able to put DTR on high or low at will. The articles here assume baut-rate based comminucations are the way to go. I'd rather not use the DDK, I don't even have it. Suggestions? Ideas? I'm thinking about using the MSCOMM32 ActiveX control, but I'm not too happy with it. I've been looking into ::CreateFile. I can open the com port without trouble, but there isn't functionality for directly reading and writing to the port. Please help me out, thanks in advance and kind regards, Griffith


      Everything you say will be misquoted, ripped out of context and used against you.

      L Offline
      L Offline
      Lakitu
      wrote on last edited by
      #2

      After you've opened the port with ::CreateFile you can use ::WriteFile to write to the port. Use ::SetCommState to control the DTR/RTS lines, the baud rate and parity settings via the DCB structure. If a train station is where the train stops, what's a workstation...?

      G 1 Reply Last reply
      0
      • L Lakitu

        After you've opened the port with ::CreateFile you can use ::WriteFile to write to the port. Use ::SetCommState to control the DTR/RTS lines, the baud rate and parity settings via the DCB structure. If a train station is where the train stops, what's a workstation...?

        G Offline
        G Offline
        generic_user_id
        wrote on last edited by
        #3

        Thanks a lot!


        Everything you say will be misquoted, ripped out of context and used against you.

        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