Solved

VB6 - USB Device List

Posted on 2007-11-25
3
2,395 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
[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
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

738 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