Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB6 - USB Device List

Posted on 2007-11-25
3
Medium Priority
?
2,494 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 750 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

722 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