如何使用c语言检测笔式驱动器 [英] How to detect pen drive using c language

查看:74
本文介绍了如何使用c语言检测笔式驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i我需要检测笔式驱动器是否已连接或不使用c语言...

如果有人知道解决方案或有任何想法,请与我分享。如果可能,请给出一些示例代码。如果有任何博客,您知道的链接请告诉我。





感谢所有人..

有一个美好的一天

hi all,

i am in a situation that i need to detect pen drive wheather it is connected or not using c language ...
if anyone knows the solution or having any ideas about it kindly share with me.if possible please give some sample code for this.if any blogs,links you know for this kindly let me know.


thanking u all..
have a great day

推荐答案

http://www.dreamincode.net/forums/topic/ 187730-flash-drive-insertion-and-removal-how / [ ^ ]



http://www.gidforums.com/t-22789.html [ ^ ]



查看以下链接...: - )
http://www.dreamincode.net/forums/topic/187730-flash-drive-insertion-and-removal-how/[^]

http://www.gidforums.com/t-22789.html[^]

Check these links... :-)


Uset GetLogicalDriveStrings() [ ^ ]读取所有可用的逻辑驱动器。使用 GetDriveType()检查每种驱动器类型[ ^



将DRIVE_REMOVABLE作为驱动器类型而BusTypeSd作为总线类型的驱动器是笔式驱动器或SD卡。



您可以使用 DeviceIoControl()检查硬盘总线类型 [ ^ ]功能。





如果您有任何其他信息,请告诉我。
Uset GetLogicalDriveStrings()[^] to read all the available logical drives. Check for each drive type using GetDriveType()[^].

The drive having DRIVE_REMOVABLE as drive type and BusTypeSd as Bus type is either a pen drive or SD card.

You can check drive bus type using DeviceIoControl()[^] function.


Let me know if you anything else.

这篇关于如何使用c语言检测笔式驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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