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.
Retrieves the drive names of all logical drives on a computer.
In my computer, it returns only C:/, D:/ and E:/. Because of that reason, d.Name gives these type of information, not like D5100. There is a platform called Wia (Windows Image Acquisition) which can access images in cameras, webcams etc. Loot at this link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With