Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
The standard code works for me in windows 7/10 but it doesnt in XP.
Is there a workaround?
Thanks

What I have tried:

I tried using the code that is on this site. But it doesnt work for XP
Posted
Updated 17-Aug-16 20:17pm
Comments
OriginalGriff 18-Aug-16 2:00am    
On this site there are hundreds of thousands of articles, millions of answers, most of which contain code.
We have no idea which "code that is on this site" you used - so spell it out: show us the code, show us where you got it. And tell us what happened that you didn't expect, or didn't happen that you did!
Use the "Improve question" widget to edit your question and provide better information.

1 solution

I'd suggest to start here: How USB Devices are Assigned Container IDs[^]

In WinXP you have to use WMI: Retrieve Hardware Identifiers with WMI and C#[^]. To get the list of USB devices, you have to loop through the collection of Win32_USBControllerDevice

For further information, please see:
ManagementClass Class (System.Management)[^]
ManagementObjectSearcher Class (System.Management)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900