Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anybody have a problem when use Canon.Eos.Framework in windows 7 #16

Open
soar-penguin opened this issue Sep 15, 2012 · 4 comments
Open

Comments

@soar-penguin
Copy link

we development a software control two cameras use Canon.Eos.Framework. when we run it in windows xp, it's ok, but when run it in windows 7, start it is OK. it can start liveView mode when in open the software. but when i hit the button take picture or change the driver len use(EDSDK.EvfDriveLens_Far2), the software is crashed. can't continue. i test in several machine. three installed XP is OK. two installed windows 7 the same problem. any idea? thank you!

@esskar
Copy link
Owner

esskar commented Sep 21, 2012

i just merged a possible bugfix from simon that may fixes your issue.

@soar-penguin
Copy link
Author

the bugfix not suitable for me. I had fix it before you merged this issue. my problem may be just because the EDSDK.dll. when i debug the program, the problem happened when the program call the api the dll provide. just like the EdsSendCommand and so on. the program is crashed, can't continue.

@soar-penguin
Copy link
Author

@esskar could you tell me why those function must change the "CallingConvention"? thank you!

    [DllImport("EDSDK.dll", EntryPoint="EdsCreateEvfImageRef", CallingConvention=CallingConvention.Cdecl)]        
public extern static uint EdsCreateEvfImageRefCdecl(IntPtr inStreamRef, out IntPtr outEvfImageRef);

    [DllImport("EDSDK.dll", EntryPoint="EdsDownloadEvfImage", CallingConvention=CallingConvention.Cdecl)]
    public extern static uint EdsDownloadEvfImageCdecl(IntPtr inCameraRef, IntPtr outEvfImageRef); 

@simonbuehler
Copy link
Contributor

@soar-penguin its has to be compiled for x86 not i64, changing the signature to Unit32 and removing the CallingConvention=CallingConvention.Cdecl should help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants