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. Com Port Problem

Com Port Problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestioncom
2 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.
  • A Offline
    A Offline
    aman2006
    wrote on last edited by
    #1

    Hi I am opening the com port for a printer device and it opens it even if the printer is not connected. More over it sends the data also to com port even printer is not there. Can any body help me how can i detect the device is connected or throw an error if device is not connected or can detect something on the data is not receiving to the device? Thanks Shailesh

    M 1 Reply Last reply
    0
    • A aman2006

      Hi I am opening the com port for a printer device and it opens it even if the printer is not connected. More over it sends the data also to com port even printer is not there. Can any body help me how can i detect the device is connected or throw an error if device is not connected or can detect something on the data is not receiving to the device? Thanks Shailesh

      M Offline
      M Offline
      Monty2
      wrote on last edited by
      #2

      ports will connect regardless of the device connected or not, try to send some data and then wait for the signal from the printer, if no signal then raise error if you just want to control the printer why not use the printer api C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg

      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