Canon developer's toolkit in C++
April 14, 2008 4:17 AM   Subscribe

Anyone here have any experience with programming using the Canon camera control toolkit? (EDSDK2.3, C++, for windows)

It's a developer's toolkit and comes with a sample application that compiles and runs, but the dang thing is so abstracted into GUI OOP land that I can't find an entry point for issuing commands in the code.

I'm trying to make a command line tool, that takes exposure and aperture arguments, shoots and leaves. I can't even find the main().
posted by StickyCarpet to Computers & Internet (1 answer total) 2 users marked this as a favorite
 
I've not used that toolkit, but I have dealt with that kind of code before. Here's what I suspect is what you're looking at - somebody was assigned to write an application to show off the control kit and got lost in application design and started doing things like designing deep hierarchies and implementation sender/receiver patterns so that they can get an infinite number of undo/redo in the menus and have uniform drag and drop across all UI items and a bunch of things that hide that the point is to teach someone how to understand the API, not teach someone OOP programming.

Here's what I do: run it out of the debugger and start setting breakpoints in code that you KNOW is getting run. Best if you can find some leaf code that does some work (like File->Open).

Want to find the main? On your first breakpoint, it better be the bottom stack frame.

Want to track how things work? Break on File->Open or some such thing and follow the stack back to the code that called into the menus. Set a break where the menu dispatching originated and then continue. Do a menu command that activates the camera and you should hit the menu origination breakpoint. Now step into everything and you should eventually get into the code that does the actual work.

It takes time, but you'll get it.

When you do, write up a real sample app and send it back to Canon.
posted by plinth at 6:27 AM on April 14, 2008


« Older Is there some easy, cheap and ...   |  60s pop art painting of a Gulf... Newer »
This thread is closed to new comments.