开发者

WINAPI to get device status

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
  • 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.


Take a look at CM_Get_DevNode_Status the status code you look for is outout as pulProblemNumber

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜