Windows provides information about different sorts of attached devices, like hard disks, CDROMs, printers and others. These devices can be attached to the computer via different interfaces like USB, SCSI, serial or parallel ports, etc.
See a sample video of what you can do with it in an Access Database application (DeviceDetectorAuthDemo.accdb) here:
https://www.youtube.com/watch?v=qh5hrhpRNIg
AxDeviceDetector.exe is a (32 bits) ActiveX OOP (out of process) EXE Server that exposes 2 classes:
There are three projects in this repository:
AxDeviceDetector.vbp
SaDeviceDetector.vbp
This is not an ActiveX server, just a standalone executable that serves as sample and demo.
You can just run this executable, no need to register the ActiveX server for it to function, as it does not use the classes via ActiveX, they're privately embedded in the executable. This project uses the same classes, but adds the frmDetector form that displays the events in a listbox.
WARNING: When you start this project in the Visual Basic IDE, it will tell you that the two classes (DeviceDetector and DeviceInfo) have a public interface, which is not possible for a standalone executable. This happens because the two projects share the same source files. The Visual Basic IDE will change these properties as private. Don't save the project with these changes, or you'll have to restore them back to "Multiuse" for the ActiveX server project.
AxDeviceDetectorTest.vbp
There is a blog post that explains this project on my personal blog.
The deviceinfo.dll DLL needed in this project, was produced with Visual Studio 2017 (please see the deviceinfo_dll repository readme), so it needs the presence of the corresponding Visual C 2017 runtime (x86) installed on the target computer to function properly.
You'll also need the msvbvm50.dll Visual Basic 5 runtime DLL (SP3).
The downloadable zip file contains both the required DLLs, that you should place either where the exe files are, or in one of your PATH directories.