Help to access Digital Camera from C#
-
Hi, I need help to access the files on my digital camera. I have tryed to access it with
String path; Shell32.ShellClass shell = new Shell32.ShellClass(); Shell32.Folder2 folder = (Shell32.Folder2)shell.BrowseForFolder( this.Handle.ToInt32(), "Select Folder...", 0, Shell32.ShellSpecialFolderConstants.ssfDESKTOP ); path = folder.Self.Path;
path = ";;{E211B736-43FD-11D1-9EFB-0000F8757FCD}\\devid:{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000:" Unfortunately this path is not accessable with
String \[\] files = Directory.GetFiles(path);
Any idea how to access the files?
-
Hi, I need help to access the files on my digital camera. I have tryed to access it with
String path; Shell32.ShellClass shell = new Shell32.ShellClass(); Shell32.Folder2 folder = (Shell32.Folder2)shell.BrowseForFolder( this.Handle.ToInt32(), "Select Folder...", 0, Shell32.ShellSpecialFolderConstants.ssfDESKTOP ); path = folder.Self.Path;
path = ";;{E211B736-43FD-11D1-9EFB-0000F8757FCD}\\devid:{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000:" Unfortunately this path is not accessable with
String \[\] files = Directory.GetFiles(path);
Any idea how to access the files?
Hi, what is all this? when I want to access image files on my Olympus, I just explore
I:\DCIM\100OLYMP\
either with Windows Explorer or with my own code as inDirectory.GetFiles(@"I:\DCIM\100OLYMP\");
. Obviously the drive letter may vary, and the specific folder path may be different for other makes and models. [ADDED] If you don't know the drive letter, you can enumerate all candidates usingEnvironment.GetLogicalDrives
and try the Directory.GetFiles for each of them (assuming the path is unique). [/ADDED] :)Luc Pattyn [Forum Guidelines] [My Articles]
Love, happiness and fewer bugs for 2009!
-
Hi, what is all this? when I want to access image files on my Olympus, I just explore
I:\DCIM\100OLYMP\
either with Windows Explorer or with my own code as inDirectory.GetFiles(@"I:\DCIM\100OLYMP\");
. Obviously the drive letter may vary, and the specific folder path may be different for other makes and models. [ADDED] If you don't know the drive letter, you can enumerate all candidates usingEnvironment.GetLogicalDrives
and try the Directory.GetFiles for each of them (assuming the path is unique). [/ADDED] :)Luc Pattyn [Forum Guidelines] [My Articles]
Love, happiness and fewer bugs for 2009!
-
yeah, it's simple you don't need shell32. or maybe you asked the question in a wrong way.
One of my cameras "Canon PowerShot SD750" is not shown as a drive (x:\) as my Nikon D50 does. It appears as "Scanners and cameras" in the explorer.
-
One of my cameras "Canon PowerShot SD750" is not shown as a drive (x:\) as my Nikon D50 does. It appears as "Scanners and cameras" in the explorer.
Well, some Canon cameras you can access directly with their SDK. Check out the wrapper that Ben and I wrote, it's here on CP. Or, look into using WIA.
Christian Graus Driven to the arms of OSX by Vista.