Solved

VB6 - USB Device List

Posted on 2007-11-25
3
2,357 Views
Last Modified: 2010-04-21
Hello!

I am working on a control application that uses a USB Device.
I want to be able to detect the presence of the USB Device.

Note: The Device is not a Pen Drive, it is a USB DTMF MODEM

In fact, having access to the USB Device List would help!
I have found this USBDEVIEW Application that displays all USB INfo, see:
http://www.nirsoft.net/utils/usb_devices_view.html

If i would be able to programmatically detect the presence by Vendor ID, Product ID and Connected Status...

Any ideas?

NJ
0
Comment
Question by:njacques
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 250 total points
ID: 20349000
This is a third part tool which can help you to sniff USB devices.

http://www.filedudes.com/USB_Monitor-download-42594.html

or Please visit this to have some idea for your requirement

http://www.codeguru.com/forum/showthread.php?t=439461
http://www.codeguru.com/forum/showthread.php?t=429459&highlight=usb
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 20349002
0
 

Author Closing Comment

by:njacques
ID: 31410894
Hello!

The Working code was found @ http://www.codeguru.com/forum/showthread.php?t=439461

----------code-------------
Dim obj, obj1 as object
Dim ID_Check as String

ID_Check = "Id_3500"

Set obj = GetObject("winmgmts:\\" & ComputerName).InstancesOf("Win32_PnPEntity")

For Each obj1 In obj
If InStr(1, obj1.PnPDeviceID, ID_Check, vbTextCompare) <> 0
' some statements here ......
End If
next
-----------

Thanks

NJ
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

830 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