Canon EDSDK on .NET Core 6 standard 2022 C#

812 views Asked by At

Is it possible to control a Canon Camera on the latest .NET, currently .NET 6, or Core or Standard using their EDSDK.dll version 13.15.10.3 or any other lib via C#?

Control = snap a pic, save the image, set some settings, etc.

Canon provides a SDK EDSDK.dll and example C# code circa .NET 4.5 (2012). Current dll version is 13.15.10.3.

In framework the example app works and uses [DllImport("EDSDK.dll")]

The same code and lib on .NET 6 throws this error:

System.BadImageFormatException HResult=0x8007000B Message=An attempt was made to load a program with an incorrect format. (0x8007000B) Source=HardwareControl
StackTrace:
at EDSDKLib.EDSDK.EdsInitializeSDK()

Any info to how this would be done with the latest tools OR a strong 'noop, move on' is appreciated.Thanks!

/rant: MS basically pulled a 'New Coke' over .NET versions so here is a random primer.

0

There are 0 answers