如何检查USB媒体是否可写 [英] How to check if USB media is writeable

查看:140
本文介绍了如何检查USB媒体是否可写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有CreateFile()的替代方法来检查USB是否可写?

谢谢.

Is there an alternative method to CreateFile() for checking whether USB is writeable?

Thank you.

推荐答案

如果在C ++中提供了try and catch逻辑,也许您可​​以使用它...只是一个疯狂的猜测,希望我能提供帮助. :-)
if try and catch logic is available in C++ maybe you can use that... just a wild guess hoping i could help. :-)


即使我们无法找到CreateFile的替代API,也可以通过使用CreateDirectory而不是CreateFile来检查USB是否可写来解决我们的问题.

谢谢.
Even if we aren’t able to find an alternative API for CreateFile, our issue solved by using CreateDirectory instead of CreateFile to check whether USB is writable or not.

Thank You.


这篇关于如何检查USB媒体是否可写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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