How an application can check if a PCI device is disabled/enabled (done from Device Manger) ?
If you are using C# then WMI is very easy to use and the Win32_SystemDriver class will indicate a State of ‘Stopped’ for a disabled device.
Thanks Mark. Mine is a C++ application.
Then unfortunately you can use the devcon sample code to do this the hard way.
You can still use WMI in C / C++, but the SetupDI API is the standard way.
You can still use WMI in C / C++
You can, but if you ever have had the misfortune to have to do this, it is not something you are likely t5o recommend.
I have never used WMI from any language other than C. Like all COM interfaces it is much easier to use in C++ than in C. The Setup DI APIs are much simpler I think.
In my shop, we use a lot of C#. Probably the most used of any language. But I have had the misfortune to have to use a lot of stuff