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. Serial Comms

Serial Comms

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomtutorialquestion
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.
  • R Offline
    R Offline
    Ruca
    wrote on last edited by
    #1

    Hi, I am using MSComm32 ActiveX in my application. I have a little problem with the following: If I open the Com port using my app. and then try using the HyperTerminal to open the same com port, the HyperTerminal informs us that the port is already being used by some other program. If I close my app. the HyperTerminal can then open the port. When I first open the com port with HyperTerminal and then try opening the com port with my app. the ActiveX also informs us that the port is already open. But if I close the HyperTerminal and try with my app. again, the ActiveX indicates that the port is closed and then when I try to open it I get an error. The only way I can then get access is by resetting the modem attached to the com port and opening the com port. Does anyone know how to fix this? Have you had the same problem? Thanks Regards Rui

    L G 2 Replies Last reply
    0
    • R Ruca

      Hi, I am using MSComm32 ActiveX in my application. I have a little problem with the following: If I open the Com port using my app. and then try using the HyperTerminal to open the same com port, the HyperTerminal informs us that the port is already being used by some other program. If I close my app. the HyperTerminal can then open the port. When I first open the com port with HyperTerminal and then try opening the com port with my app. the ActiveX also informs us that the port is already open. But if I close the HyperTerminal and try with my app. again, the ActiveX indicates that the port is closed and then when I try to open it I get an error. The only way I can then get access is by resetting the modem attached to the com port and opening the com port. Does anyone know how to fix this? Have you had the same problem? Thanks Regards Rui

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Rui, maybe the GetPortOpen(port) function would help ? If it reports closed, then us PortOpen(port). Elaine (fluffy tigress emoticon) Would you like to meet my teddy bear ?

      1 Reply Last reply
      0
      • R Ruca

        Hi, I am using MSComm32 ActiveX in my application. I have a little problem with the following: If I open the Com port using my app. and then try using the HyperTerminal to open the same com port, the HyperTerminal informs us that the port is already being used by some other program. If I close my app. the HyperTerminal can then open the port. When I first open the com port with HyperTerminal and then try opening the com port with my app. the ActiveX also informs us that the port is already open. But if I close the HyperTerminal and try with my app. again, the ActiveX indicates that the port is closed and then when I try to open it I get an error. The only way I can then get access is by resetting the modem attached to the com port and opening the com port. Does anyone know how to fix this? Have you had the same problem? Thanks Regards Rui

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #3

        Only one application may have a given port open at a time. For example, if HyperTerminal has COM1 open, your application can not open COM1 as well. If you want to use HyperTerminal to test your application, connect a null modem cable between COM1 and COM2. Run HyperTerminal using COM2, and your application using COM1.


        Software Zen: delete this;

        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