Differentiating between data card and pen drive or USB flash drive

泄露秘密 提交于 2019-12-01 21:03:13

Yes. The "pen drive" and "data card" implement different interfaces. You will have subscribed using RegisterDeviceNotification for DEV_BROADCAST_DEVICEINTERFACE. The LPARAM of the WM_DEVICECHANGE you get back will then be a DEV_BROADCAST_DEVICEINTERFACE*. This structure has a dbcc_classguid member. This will be GUID_DEVINTERFACE_VOLUME for your pen drive, and something else for your datacard - experiment.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!