I have used SetupAPI to enumerate all the drivers, build a list of its properties etc etc. But what i want is to enumerate only the "Active" drivers for any device.
Eg. For a Intel HD 5500, There are a couple of drivers installed in the System with different versions like
20.19.15.4531
20.19.15.4454
But the version shown in DeviceManager is 20.19.15.4531. I need to get only this version.
When I use SetupAPI, I Get both the drivers. I've tried the solution listed at This Post but I can confirm that the solution does not work for me.
SetupDiGetSelectedDriver() also does not work. i.e. It works only when we are installing a driver to the store using SetupAPI functions.
Any Help will be really appreciated.
Note : There is no problem in finding and Enumerating the drivers. I use SetupDiBuildDriverInfoList() and SetupDiEnumDrvInfo(), and they work as expected.
I Finally ended up building a list of current drivers using WMI in c++. Couldn't find a way out!