I am working on a project and I need to get the list of plugged in devices in the PC, just like the Windows Device Manager does.
But I don't know how to communicate with Windows to retrive the list of available devices in Delphi Firemonkey framework. I am using Delphi 12.
Everything that Device Manager does is done through the "SetupDi" APIs. They are powerful, but very wordy. The devcon
tool from Microsoft also does all of these functions, and the source code is available:
https://github.com/microsoft/Windows-driver-samples/tree/main/setup/devcon
Please note that this is complicated. Be patient, follow the sample.