Click here to Skip to main content
16,021,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i'm trying to write a program in c# for tethering a canon s3is digital camera.

When i connect the camera it seems to go into a kind of sleep mode or connection mode, the lens is retracted and no image in the viewfinder but i can see the camera in explorer.

I'm able to make it take pictures using WIA , the camera turns on , take a picture and goes back to 'sleep mode' so i guess that would mean it's wia compatible.

Now i need to have the live viewfinder work in the program but i can't seem to find any info on how to do that.

i tried using CreateVideoByWiaDevID from IWIAVideo but it gives an exception HRESULT: 0x80210015. Apparently it means the device is not compatible or abscent which is weird cause i can take pictures with it...

I do have access to the canon SDK but i do programming for a hobby and i'm not familiar with C (the sdk language uses), pointers , headers , callback and all the other things that seems to be necessary to use the SDK

any help will be apreciated
Posted

1 solution

I wrote a C# wrapper for the Canon SDK, it's an article here on Code Project. Just search for Canon. It's probably quite a bit out of date, but it could be the way forward if you wanted to update it, or just see if it works. That's assuming it's the same SDK.

When I tried using WIA instead of that SDK, all I could do was take pictures, no viewfinder, etc. The SDK let me set all camera settings, zoom, preview, etc.
 
Share this answer
 
Comments
Louis-Etienne Chicoine 9-Feb-12 16:27pm    
Yeah i think i saw that in my research but i haven'tried it yet. I have the documentation for the SDK but it's seems rather complex to make it work even once wrapped.

I'm still a newb in terms of programming and it's mostly Object oriented. If i need to display a video i put a component on my form that does this , so the whole SDK is a bit overwhelming to comprehend for me.

I found the function that i would need to call but then the explanation goes on about various buffers and callback function that i seem to have to define which one i want ? and saying that the image should display somewhere in that callback function....

all stuff i'm pretty much not familiar with at the moment...
Louis-Etienne Chicoine 9-Feb-12 16:29pm    
My bad , it wasn't your wrapper that i saw. i'll give it a try
Louis-Etienne Chicoine 9-Feb-12 16:42pm    
Thank you , the sample should allow me to understand what i need to make this work
Christian Graus 9-Feb-12 17:06pm    
I hope so, although it's a few years old, as I said

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900