This is the error I am getting while referencing the CDSDK.dll:
A call to PInvoke function 'Canon_Camera_Control!RDC.CameraSDK.cdAPI::CDStartSDK' has unbalanced the stack.
This is likely because the managed PInvoke signature does not match the unmanaged target signature.
Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
The erorr is on a file called CAMERA.cs it's a part of my project to control my canon camera through the pc.
I was missing this dll file so i downloaded it twice from two places. At the first time the dll file was 300kb and gave an error but the program didn't stop i used my logger to log out the error:
5/2/2013--11:02 PM ==> Error! CDStartSDK C000060
5/2/2013--11:02 PM ==> Error! CDEnumDeviceReset C0000F1
5/2/2013--11:02 PM ==> Error! CDFinishSDK C0000F1
Then i downloaded the second file which is 298kb and he gave me this error now.
The exception is on CAMERS.cs on line number 929:
err = (UInt32)cdAPI.CDStartSDK(ref Version, 0);
This is a link to my solution/project on my SkyDrive updated including two directores:
CDSDK1 and CDSDK2 in each there is the cdsdk.dll file one is 928kb or so and other 300kb or so.
Each one give a different error.
https://skydrive.live.com/redir?resid=EB1C71C44C3976D5!202&authkey=!AAe7QvxIzBMne1Q
The project name to download is: Canon_Camera_Control
This is the complete exception message for the secon CDSDK.dll file :
PInvokeStackImbalance was detected Message: A call to PInvoke function 'Canon_Camera_Control!RDC.CameraSDK.cdAPI::CDStartSDK' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
I googled so deep now and didn't find any clue/s about this error/s.