Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.NET WMI Does Not Detect Virtual COM Port

Posted on 2008-06-18
2
Medium Priority
?
659 Views
Last Modified: 2013-12-27
We were forced to use a USB-to-Serial adapter.  The attached code will not recognize the 'virtual serial port.'  Any way around this?  Or is this the way it is going to be when not using a 'TRUE' serial port?
Dim moReturn As Management.ManagementObjectCollection
        Dim moSearch As Management.ManagementObjectSearcher
        Dim mo As Management.ManagementObject
        moSearch = New Management.ManagementObjectSearcher("Select * from Win32_SerialPort")
        moReturn = moSearch.Get
 
        Dim Coms As New System.Collections.Specialized.StringCollection
 
        For Each mo In moReturn
 
            Coms.Add(CStr(mo.Properties.Item("DeviceID").Value))
 
            Debug.WriteLine("-----------------------------------")
            Debug.WriteLine("Win32_SerialPort instance")
            Debug.WriteLine("-----------------------------------")
            Debug.WriteLine("Description: {0}", CStr(mo.Properties.Item("Description").Value))
            Debug.WriteLine("DeviceID: {0}", CStr(mo.Properties.Item("DeviceID").Value))
            Debug.WriteLine("Name: {0}", CStr(mo.Properties.Item("Name").Value))
            Debug.WriteLine("Status: {0}", CStr(mo.Properties.Item("Status").Value))
        Next

Open in new window

0
Comment
Question by:jigdog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 41

Accepted Solution

by:
graye earned 2000 total points
ID: 21822595
So, what does the following give you?

    For Each port As String In My.Computer.Ports.SerialPortNames
        debug.writeline(port)
    Next
0
 

Author Closing Comment

by:jigdog
ID: 31468659
Don't I feel like an idiot.  Still getting used to the convenient new methods and props in .net.  thanks!!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a how to to configure a UCS Ethernet-uplink portchannel via the console. It is easy to do and can be done quite quickly. In certain versions of the UCS manager the portchannel has issues coming up and this is a workaround. I am…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question