如何在c ++ win32中以编程方式删除/弹出USB设备 [英] how to programmatically remove/eject usb device using in c++ win32

查看:436
本文介绍了如何在c ++ win32中以编程方式删除/弹出USB设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式删除/弹出任何USB设备,例如usb存储,USB网络加密狗,c ++ win32中的智能手机?我能够读取所有PnP设备及其属性。现在使用他们的硬件ID,我想删除/弹出所选设备。任何建议和代码片段都将受到欢迎。在此先感谢

解决方案

有一篇关于CP的文章你可能想要阅读:如何准备安全移除USB驱动器 [ ^ ]



Microsoft也有相关文章:如何在Windows中弹出可移动媒体 [ ^ ]



希望他们帮忙

How can I remove/eject any usb device programmatically e.g usb storage, usb network dongle, smart phone in c++ win32? I am able to read all PnP devices and their attributes. Now using their hardware id, I want to remove/eject selected devices. Any suggestion and code snippets will be welcomed. Thanks in advance

解决方案

There is an article on CP you might want to read: How to Prepare a USB Drive for Safe Removal[^]

Microsoft also has article on it: How To Ejecting Removable Media in Windows[^]

Hope they help.


这篇关于如何在c ++ win32中以编程方式删除/弹出USB设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆