c#64位c ++ dll导入问题 [英] c# 64 bit c++ dll import problem

查看:115
本文介绍了c#64位c ++ dll导入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有64位处理器机器,我可以导入32位dll,但我不会在64位dll上做sama吗?为什么?

Hi guys,
I have a 64 bit processor machine and I could import 32 bit dll but I wouldnt do the sama at 64-bit dll? Why ?

推荐答案

C#.NET P / Invoke的目标CPU应该与DLL目标CPU匹配。



如果要导入64位DLL,则应在.NET项目选项中为目标CPU设置64位目标之一。 CPU 指令集架构永远不会在同一个过程中混合使用。







感谢Matt T Heffron的纠正。



-SA
The target CPU for C# .NET P/Invoke should match the DLL target CPU.

If you want to import 64-bit DLL, you should set one of 64-bit targets for the target CPU in your .NET project options. CPU instruction-set architectures never ever can be mixed in the same process.



Thanks to Matt T Heffron for the correction.

—SA


这篇关于c#64位c ++ dll导入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆