EDSDK from Canon: 2.15 (nov 2014)
Canon T2i
Dell i7 laptop, Win10x64
As downloaded: Camera.cs - Lines 701, 706 throw PInvokeStackImbalance exceptions.
EDSDKInvokes.CreateEvfImageRef
EDSDKInvokes.DownloadEvfImage
Details on both say The name '$exception' does not exist in the current context
.
The other calls in EDSDKInvokes to NOT throw this exception and seem to work as the live preview frames do arrive and display.
Running without debugging shows the frame still arrives and is visible in the sample EDSKDWrapper.UI
project MainView.xaml
window.
Eventually however even this fails with
... has stopped working." Attaching the debugger then shows "Unhandled exception at 0x72DB3AA2 (clr.dll) in EDSDKWrapper.UI.exe: Stack cookie instrumentation code detected a stack-based buffer overrun.
I am running Windows 10 tech preview, so maybe that has something to do with it but so far everything that works in Win8.1 is same in Win10.
These seem to be the only calls in that file that are specifying CallingConvention
If I remove that argument it seems to run fine and not throw the error:
//[DllImport("EDSDK.dll", EntryPoint = "EdsCreateEvfImageRef", CallingConvention = CallingConvention.Cdecl)]
[DllImport("EDSDK.dll", EntryPoint = "EdsCreateEvfImageRef")]
...
//[DllImport("EDSDK.dll", EntryPoint = "EdsDownloadEvfImage", CallingConvention = CallingConvention.Cdecl)]
[DllImport("EDSDK.dll", EntryPoint = "EdsDownloadEvfImage")]
ReturnValueManager.cs | Line 53 | HandleFunctinReturnValue
Continuously throws exception ObjectNotReady
- yet the frames are coming up pretty fast and at decent resolution for the last 20 minutes without crash.