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#
  4. SerialPort Info

SerialPort Info

Scheduled Pinned Locked Moved C#
com
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.
  • H Offline
    H Offline
    half life
    wrote on last edited by
    #1

    Hi, i'm Trying to Retrieve the serial com Info using this code: ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from WIN32_SerialPort"); foreach(ManagementObject Port in searcher.Get()) { string a = (string) Port.GetPropertyValue("Name"); } The Thins is that it only get's the first COM info i have COM1 and USB Serial COM2 but i could not get the USB Serial COM2 info ANYONE, THANKS :)

    Have Fun Never forget it

    D 1 Reply Last reply
    0
    • H half life

      Hi, i'm Trying to Retrieve the serial com Info using this code: ManagementObjectSearcher searcher = new ManagementObjectSearcher("Select * from WIN32_SerialPort"); foreach(ManagementObject Port in searcher.Get()) { string a = (string) Port.GetPropertyValue("Name"); } The Thins is that it only get's the first COM info i have COM1 and USB Serial COM2 but i could not get the USB Serial COM2 info ANYONE, THANKS :)

      Have Fun Never forget it

      D Offline
      D Offline
      dave kelly
      wrote on last edited by
      #2

      If it is just the list of serial ports in your system you want, just use the static function: string [] allComPorts = SerialPort.GetPortNames (); It will return hardware and virtual ports.

      H 1 Reply Last reply
      0
      • D dave kelly

        If it is just the list of serial ports in your system you want, just use the static function: string [] allComPorts = SerialPort.GetPortNames (); It will return hardware and virtual ports.

        H Offline
        H Offline
        half life
        wrote on last edited by
        #3

        THANKS a Lot :) :)

        Have Fun Never forget it

        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