Enumerate Com port Informations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cravi
    New Member
    • Nov 2008
    • 4

    #1

    Enumerate Com port Informations

    I need to enumerate COM Port Details.Specifi cally i want to know USB Serial Port Information(USB Availability,St atus, StatusInfo,Name ,Description ).

    Thanks
  • IanWright
    New Member
    • Jan 2008
    • 179

    #2
    What've you got so far?

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      If you have a USB serial port, it will show up just like the other serial ports.

      string mySerialPortNam es = System.IO.Ports .SerialPort.Get PortNames();



      If you want more hardware level information, you can probably get it from WMI. Check out the WMICodeCreator to search into the details

      Comment

      • cravi
        New Member
        • Nov 2008
        • 4

        #4
        Originally posted by Plater
        If you have a USB serial port, it will show up just like the other serial ports.

        string mySerialPortNam es = System.IO.Ports .SerialPort.Get PortNames();



        If you want more hardware level information, you can probably get it from WMI. Check out the WMICodeCreator to search into the details

        Thank you for your info..,

        I already tried WMI for for enuerate USB port info. But i am notable to get these(USB Port Availability, Status, Name, Which Como port currently Used) Information.

        Comment

        • cravi
          New Member
          • Nov 2008
          • 4

          #5
          Originally posted by IanWright
          What've you got so far?
          Now I got only COM Port Name. But I need USB Port Availability, Name, Status , Description, Which Com Port Used all These things.

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            What do you mean "USB Port availablity"? There is either something plugged into the usb port, or there isn't.
            If you want the SERIALPORT availability, try to connect to it. It will say it's in use if it is.

            Comment

            • cravi
              New Member
              • Nov 2008
              • 4

              #7
              Originally posted by Plater
              What do you mean "USB Port availablity"? There is either something plugged into the usb port, or there isn't.
              If you want the SERIALPORT availability, try to connect to it. It will say it's in use if it is.
              I don't know how to connect .plz help me.

              thanks

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                Msdn is your friend:
                http://msdn.microsoft.com/en-us/libr...rs(VS.80).aspx

                Comment

                Working...