digiCamControl icon indicating copy to clipboard operation
digiCamControl copied to clipboard

'System.NotImplementedException' in CameraControl.Devices.dll

Open piotrbalut opened this issue 9 years ago • 13 comments

I have a problem with PhotoBooth project. Every time when I want to take a photo the method CapturePhoto (exactly line Device.ExecuteCommand(Conts.wiaCommandTakePicture)) from namespace CameraControl.Devices.Others.WiaCameraDevice generate exception: Exception thrown: 'System.NotImplementedException' in CameraControl.Devices.dll

I test it using Canon EOS 40D.

Do you have any idea where is problem ?

piotrbalut avatar Jul 11 '16 16:07 piotrbalut

The main application it is working for you ?

dukus avatar Jul 11 '16 16:07 dukus

Yes, the main app works great.

piotrbalut avatar Jul 11 '16 17:07 piotrbalut

same for me. Tested the software with my EOS 500D, worked perfectly. Downloaded the git repo and I get the same thing. Camera is detected but taking a picture throws the not-implemented-exception :/ Any tips?

le-rou avatar Aug 01 '16 12:08 le-rou

Make sure you (manually) copy the Canon EDSDK.dll into the directory where the compile is, bin\debug

BStrauss3 avatar Aug 01 '16 12:08 BStrauss3

tried that. Still getting that exception :/

le-rou avatar Aug 01 '16 12:08 le-rou

When you run it from Visual Studio what do you see in the exceptions in the output window? I was seeing the failure to load message which went away when I copied the dll.

Note that which bin\debug to copy into is dependent on which program you are running, Camera Controls vs. CameraControlCmd vs. CameraControlRemoteCmd

BStrauss3 avatar Aug 01 '16 12:08 BStrauss3

I cloned the git repo and am trying to get the example to run (CameraControl.Devices.Example) as I'm looking for a simple way to just capture a picture. So i copied the EDSDK.dll into the bin/debug in the example dir. Still getting the exception:

Exception thrown: 'System.NotImplementedException' in CameraControl.Devices.dll An unhandled exception of type 'System.NotImplementedException' occurred in CameraControl.Devices.dll Additional information: The method or operation is not implemented.

I also tried the CameraControl now - it handles the exception but still I get the same result (see the excetption in the output windows, getting an error in the application). Tried copying the dll here, but it was already there.

Btw.: Thanks for your help so far!

le-rou avatar Aug 01 '16 12:08 le-rou

Look further up the exception stack i.e. earlier in time. If it can't load the dll that exception gets swallowed and you hit the not implemented in the base class

BStrauss3 avatar Aug 01 '16 13:08 BStrauss3

Again thank you for taking the time!

I've tried around a bit. There is no word about the EDSDK.dll - not that it's loaded and not that it couldn't be loaded. I tried a DLLImport in the Form1.cs and called the init method. That worked. The dll is definitely in the bin/debug directory. The Canon.Eos.Framework.dll is built and present. That's the one implementing the DLLImports anyway.

I'm kind of stuck here.. any more advice would be very much appreciated. I did make a pastebin of my output - this one is the unmodified version. Just ran the CameraControl.Devices.Example from VS and hit Capture (the EOS 500 was selected in the combo box).

http://pastebin.com/Gyq9UTAi

Thanks again!

le-rou avatar Aug 02 '16 09:08 le-rou

Please check the source again, now the debug info is outputted directly in form text box

dukus avatar Aug 02 '16 14:08 dukus

Just to be sure I deleted my local version and cloned it new.

app.config is missing for the example project. Put in a dummy.

Started the example and it outputs:

Connection device start Connection device ?\usb#vid_04a9&pid_31cf#5&1e92747d&0&12#{6ac27878-a6fa-4155-ba85-f98f491d4f33} Wia Camera Found: Canon EOS 500D ===========Camera is connected============== Driver :WiaCameraDevice Name :Canon EOS 500D Manufacturer :Canon Inc.

Then I click on capture and get the NotImplemented Exception.

https://imagebin.ca/v/2qBvpkuFMjgA

le-rou avatar Aug 02 '16 15:08 le-rou

Check it now

dukus avatar Aug 02 '16 16:08 dukus

It works. Thank you very much for your effort, it's very much appreciated!

le-rou avatar Aug 02 '16 18:08 le-rou