views:

58

answers:

1

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");

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).