Solved

VB6 - USB Device List

Posted on 2007-11-25
3
2,332 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now