I am trying to get my connected DSLR’s drive information so that I can access the photos inside the SD card. I can’t directly read from the SD card because of project requirements.
I tried using .NET’s DriveInfo but it couldn’t register my connected DSLR. Am I doing anything wrong?
Code:
DriveInfo[] drives = DriveInfo.GetDrives();
foreach(DriveInfo d in drives)
{
if(d.Name == "D5100")
Console.WriteLine("Camera found");
}
Edit: The results of the following code is that “C://” is found only. No other drives are detected.
Edit2: The connected DSLR seems to not be under any drives.

DriveInfo.GetDrives()method gets only logical drives on your computer.In my computer, it returns only
C:/,D:/andE:/. Because of that reason,d.Namegives these type of information, not likeD5100. There is a platform called Wia (Windows Image Acquisition) which can access images in cameras, webcams etc. Loot atthis link.