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 COM on MOXA cards when > COM9 and using Win32 API on NT

Serial COM on MOXA cards when > COM9 and using Win32 API on NT

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomjsonhelp
2 Posts 1 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
    GBO
    wrote on last edited by
    #1

    Hello, Friday afternoon, ... Thought I should post this question now: "How does a programmer open COM 10, 11 or higher" [ccode] HANDLE hCom = CreateFile(szPort, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL)); [/ccode] It fails when using szPort = "COM10" although I do have the COM Ports available. Anyone experience in this field? I am working on NT. The cards are MOXA CI-134/ISA and C168H/PCI. I know there is a limitation when working with standard Win32 COM lib on Win 3.11, but does it still apply to WinNT ?? I thought WinNT could handle up to 256 COM ports? Help!

    G 1 Reply Last reply
    0
    • G GBO

      Hello, Friday afternoon, ... Thought I should post this question now: "How does a programmer open COM 10, 11 or higher" [ccode] HANDLE hCom = CreateFile(szPort, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL)); [/ccode] It fails when using szPort = "COM10" although I do have the COM Ports available. Anyone experience in this field? I am working on NT. The cards are MOXA CI-134/ISA and C168H/PCI. I know there is a limitation when working with standard Win32 COM lib on Win 3.11, but does it still apply to WinNT ?? I thought WinNT could handle up to 256 COM ports? Help!

      G Offline
      G Offline
      GBO
      wrote on last edited by
      #2

      Problem solved: I did get a very usefull reply from Mr Miller from Manaware. --- NT can do up to 256. The card manufacturer has not set up the registry and the 'DosNames' for the devices correctly. There might be other names for those serial ports, but the "COM" file names need special aliases created in the registry. Some manufacturers fail to add those when they install or initially load the device driver. Use RegEdit and look for 'SerialPort' or 'Serial Port' and you might find their real names. So the answer to your quesitons is "Yes, you are right, and the card manufacturer still has some work to do on their device drivers." --- The problem was solved by using "\\.\COMxx" In stead of opening "COMxx" (where xx is is the number)

      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