USB到micro USB adpater在设备更换中无法识别 [英] USB to micro USB adpater not getting recognized in ondevicechange
问题描述
HI,
当插入/拔出USB到micro USB adpater时 我的windows系统,ondevicechange() 正在调用,但我得到PDEV_BROADCAST_HDR为null,事件类型值为7.
When plug in/out USB to micro USB adpater in my windows system, ondevicechange() is getting called but I am getting PDEV_BROADCAST_HDR as null and event type value as 7.
DBT_DEVICEARRIVAL和 USB到micro USB adpater没有触发DBT_DEVICEREMOVECOMPLETE事件。
The DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE events are not getting triggered for USB to micro USB adpater.
可能的原因是什么?
我是否必须调用RegisterDeviceNotification() ?如果是这种情况我必须设置什么GUID?
Whether I have to call RegisterDeviceNotification()? If that is the case what GUID I have to set?
推荐答案
你好,
也许这篇文章可以帮到你:
maybe this article can help you:
https://www.codeproject.com/Articles/14500/Detecting-Hardware-Insertion-and-or-Removal
或者可能是适配器没有芯片可以解释PC是哪种设备。如果它只是一根电缆,我想,没有检测到真正的设备。
Or maybe the adapter does not have a chip that explains the PC which device it is. If it's only a cable, I think, no real device is detected.
这篇关于USB到micro USB adpater在设备更换中无法识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!