tags:

views:

185

answers:

2

I want to get the list of usb devices from the Windows system.

I don't know Win 32 programming and all.

I am using Qt for development, don't have any idea to solve my problem.

I have searched code for that, but I can't find anything.

+3  A: 

Hi

I'm not sure, but on libusb site I have found such documentation, which may be useful for you:

usb_init -- Initialize libusb
usb_find_busses -- Finds all USB busses on system
usb_find_devices -- Find all devices on all USB devices
usb_get_busses -- Return the list of USB busses found

But!, here some one already asked this question: Program in QT to control an USB device ? And the answer is: no.

mosg
Thank you for the reply.i cant use any 3rd party resourcesany other ideas
barbgal
@new: ideas to do *what* exactly? You only asked for a list of devices, improve your question.
Hans Passant
A: 

I recommend you "to play" with devcon.exe (see http://support.microsoft.com/kb/311272).

The last version of the utility with the source code you can find in Windows DDK (see and download from http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx). After installation of DDK look in C:\WinDDK\7600.16385.1\tools\devcon\i386 and C:\WinDDK\7600.16385.1\src\setup\devcon directories.

devcon is a very good example what you can do with Device Installation API (SetupDi-API).

Oleg