Solved

VB6 - USB Device List

Posted on 2007-11-25
3
2,301 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
Comment Utility
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
Comment Utility
0
 

Author Closing Comment

by:njacques
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 49
MsgBox 2 36
VBA filters 2 37
Visual Studio search word table and return Cell index 8 37
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 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…
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…

743 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

18 Experts available now in Live!

Get 1:1 Help Now