views:

20

answers:

0

Hi, Is there any WINAPI call available to get the status of a particular device. I am able to get a handle to the device using the calls,

SetupDiGetClassDevs SetupDiEnumDeviceInfo and SetupDiSetSelectedDevice

But I want to uninstall the device only if the status shows error code 28. (Please refer http://support.microsoft.com/kb/125174 for error codes).

From my previous post here, i got to know how to uninstall a device and that is working perfectly fine for me.

I just need to know how to get the device status using a WINAPI call.

Please guide.

Thanks & Regards Ananth