本文介绍了使用非托管dll托管AnyCPU的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好.我到处都读到AnyCPU相应地运行着一个运行平台.那为什么不能为托管程序设置AnyCPU,而对于本机dll则说x64呢?我希望它会根据我的笔记本电脑平台运行,但是我有BadImageFormat 当我的程序从该dll调用函数时出现异常,尽管该dll和我的笔记本电脑均为x64.为什么呢?
Hello. I read everywhere that AnyCPU runs accordingly a platform on which it's running. Then why can't I set AnyCPU for managed program and let's say x64 for native dll? I expect that it will run according to my laptop platform but instead I have BadImageFormat exception when my program calls a function form this dll, despite the fact that this dll and my laptop both x64. Why is that?
推荐答案
这篇关于使用非托管dll托管AnyCPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!