[fpc-pascal] How to list USB devices on Windows?

Bo Berglund bo.berglund at gmail.com
Wed Jun 27 07:32:24 CEST 2018


I am writing a class that interfaces to a specific USB device HID type
and I would like to list all such devices currently connected to the
PC (usin Windows).

On Linux I can do this on the command line:

$ lsusb
Bus 001 Device 004: ID 07f2:0003 Microcomputer Applications, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This gets me as the ID the vendorid:productid so I can scan for the
interesting device type:

$ lsusb | grep 07f2:
Bus 001 Device 004: ID 07f2:0003 Microcomputer Applications, Inc.

Is there some way I can do this on Windows so I can create a list of
the device type I work with?
Or is there an FPC command already?

-- 
Bo Berglund
Developer in Sweden




More information about the fpc-pascal mailing list