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. Hardware & Devices
  4. Use the COM Port while using XP

Use the COM Port while using XP

Scheduled Pinned Locked Moved Hardware & Devices
questioncsharpcomhardware
4 Posts 3 Posters 12 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.
  • J Offline
    J Offline
    j
    wrote on last edited by
    #1

    I want to write a program in VB.Net which accesses my computer's COM-Ports. While using windows 98 this is no problem, because there's a DLL which I can use. While using XP this is not possible because of HAL (Hardware Abstraction Layer). I already know that with HAL, it is possible to access COM-Ports by open a file. The problem is that I don't just need the TXD/RXD port but also ports like RI or RTS. How can I manage this? (Maybe there are drivers who create a virtual COM port and translate it to HAL to use the real port?)

    A M J 3 Replies Last reply
    0
    • J j

      I want to write a program in VB.Net which accesses my computer's COM-Ports. While using windows 98 this is no problem, because there's a DLL which I can use. While using XP this is not possible because of HAL (Hardware Abstraction Layer). I already know that with HAL, it is possible to access COM-Ports by open a file. The problem is that I don't just need the TXD/RXD port but also ports like RI or RTS. How can I manage this? (Maybe there are drivers who create a virtual COM port and translate it to HAL to use the real port?)

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx

      1 Reply Last reply
      0
      • J j

        I want to write a program in VB.Net which accesses my computer's COM-Ports. While using windows 98 this is no problem, because there's a DLL which I can use. While using XP this is not possible because of HAL (Hardware Abstraction Layer). I already know that with HAL, it is possible to access COM-Ports by open a file. The problem is that I don't just need the TXD/RXD port but also ports like RI or RTS. How can I manage this? (Maybe there are drivers who create a virtual COM port and translate it to HAL to use the real port?)

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        No, you can't access the serial ports by simply using IN/OUT instructions as you may have done in DOS. On XP, those I/O ports are restricted to supervisor mode (the kernel). You must use the serial communications APIs. Unfortunately this is one of the less-well documented areas of the Win32 API. To be notified when the Ring Indicator or Clear-To-Send (i.e. the PC's view of the other end's Ready-To-Send line), use the WaitCommEvent[^] API. Stability. What an interesting concept. -- Chris Maunder

        1 Reply Last reply
        0
        • J j

          I want to write a program in VB.Net which accesses my computer's COM-Ports. While using windows 98 this is no problem, because there's a DLL which I can use. While using XP this is not possible because of HAL (Hardware Abstraction Layer). I already know that with HAL, it is possible to access COM-Ports by open a file. The problem is that I don't just need the TXD/RXD port but also ports like RI or RTS. How can I manage this? (Maybe there are drivers who create a virtual COM port and translate it to HAL to use the real port?)

          J Offline
          J Offline
          j
          wrote on last edited by
          #4

          Thanks to you, I've now found a way to use the PORT.dll with WinXP as well, and it's nearly the same as with win89: You just have to set the outports to 0 at the beginning.

          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