|
-
Mar 7th, 2012, 09:52 PM
#1
Thread Starter
Junior Member
Get USB controller Device IDs?
Could anyone help me with this? I'm looking for the simplest, most efficient way to get a list of the Device IDs of all of the USB game controllers and USB mice attached to the pc.
I think I should be using setupapi.dll, but when I try to research it I find pages and pages of code for all of the different things you can do with it. I think I only need a few lines, as this is the only thing I will ever use it for.
Basically, I will have a form with a string array and a button. Anytime I click the button, I want it to redim the array with the Device IDs of all the currently connected USB game controllers and mice. I don't need them in any specific order, I just need all the IDs in the array.
From there I can display the array in a list box, or save it to a .txt file or whatever I want. The problem is that I just don't know how to get the IDs.
It doesn't have to use setupapi.dll, just whatever works efficiently. I want it to be quick and not leave any weird processes open after the code is run. Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|