开发者

How to get USB devices List

开发者 https://www.devze.com 2023-01-02 12:17 出处:网络
I want开发者_StackOverflow社区 to get the list of usb devices from the Windows system. I don\'t know Win 32 programming and all.

I want开发者_StackOverflow社区 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.


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.


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).


You need to call GetRawInputDeviceList() and GetRawInputDeviceInfo() also check the Intel Example

0

精彩评论

暂无评论...
验证码 换一张
取 消