搜索SD卡 [英] Searching for SD-cards
本文介绍了搜索SD卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要实现在寻找我的程序SD卡
I need to implement searching for SD-cards in my program.
目前我使用的搜索像所有移动设备:
Currently I'm using search for all removable devices like:
searcher = New Management.ManagementObjectSearcher("\\localhost\root\cimv2", "SELECT DeviceId FROM Win32_LogicalDisk WHERE DriveType=2 AND Size>0");
但它找到USB闪存驱动器也。有没有发现只有SD卡一个适当的方式?
我需要的是可用SD卡一般只驱动器盘符(如F:左右)。
But it find USB flash drives also. Is there a proper way to find SD-cards only? What I need is in general only drive letter for available SD-cards (like "F:" or so).
推荐答案
的SD卡使用有一个唯一的ID。 USB记忆并非如此。所以,你可以使用从USB和SD卡的区别。我已经在Windows CE中使用了它,并正常工作。
The SD cards use to have an unique ID. USB memories not. So you can use that to distinguish from USB and the SD card. I have used it in windows ce and was working properly.
这篇关于搜索SD卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文