I have a code sample that's supposed to detect my canon 550d digital camera so I can control the camera from the pc. I just downloaded the source files from here:
http://www.codeproject.com/Articles/17344/A-wrapper-for-the-canon-CDSDK-and-PRSDK-for-remote?fid=379739&df=90&mpp=25&noise=3&prof=False&sort=Position&view=Quick&spc=Relaxed&fr=1#xx0xx
I created a new project in Visual Studio 2012 Pro; my pc is running Windows 8 64bit. I added all the .cs files and also copied all the dll files I downloaded from the Canon website after registering.
The first time I ran the program and clicked on the connect button, I got an exception that a dll is missing. Since there is no way to add the dlls as referenced, I copied them to the Debug directory.
The missing dll was PRSDK.dll, so I found and downloaded the dll, and copied it.
Now when I click on the connect button, I get a different exception:
BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
The exception is in the file Camera.cs, on the line:
err = prAPI.PR_StartSDK();
I googled for this exception and found that some people have changed the project platform and target to x86, so I tried it - I tried changing it to x86, x64, AnyCpu, everything, but it didn't help.
Maybe the PRSDK.dll file is old and not useable in Windows 8?
This is a link to my project/solution in my SkyDrive, if someone can please download it and try to run it on his machine and maybe find a solution?
https://skydrive.live.com/redir?resid=EB1C71C44C3976D5!201&authkey=!AErpIgyllPAgH9w
The project called: Canon_Camera_Control
You must have missed something. The error is definitely the one that states that the platform of your project and the one of the external dll don't match.
Maybe you changed the "Active solution platform" but not the "Project platform".
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