WINAPI to get device status

Is there access to a WINAPI call to obtain the status of a specific device. I can get access to the device using calls:

  • SetupDiGetClassDevs
  • SetupDiEnumDeviceInfo
  • SetupDiSetSelectedDevice

But I want to remove the device only if the status displays error code 28. (Contact http://support.microsoft.com/kb/125174 for error codes).

From my previous post here, I learned how to remove a device, and this works fine for me.

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

Please guide.

+3
source share
1 answer

CM_Get_DevNode_Status , , outout pulProblemNumber

+2

Source: https://habr.com/ru/post/1732165/


All Articles