Click here to Skip to main content
15,887,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok, so i'm using the following code to spit out the connected USB devices to the system:

VB
Private Sub btn_Show_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Show.Click

    Dim USBClass As New ManagementClass("Win32_USBHub")
    Dim USBCollection As ManagementObjectCollection = USBClass.GetInstances()
    Dim USB As ManagementObject

    For Each USB In USBCollection
        lb_Devices.Items.Add("Name = " & USB("Name").ToString())
        lb_Devices.Items.Add("Device ID = " & USB("DeviceID").ToString())
        lb_Devices.Items.Add("Status = " & USB("Status").ToString())
    Next USB
End Sub


As you can see I'm outputting the device list and details to a listbox.

All works ok, but I cant see the USB HIDs listed here. Anything I'm missing?

Thanks.
Posted
Updated 22-Aug-13 4:41am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900