如何在平台(任何CPU)上p/invoke dll(x64)? [英] How to p/invoke dll (x64) at platform (any cpu)?

查看:113
本文介绍了如何在平台(任何CPU)上p/invoke dll(x64)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好:
我的操作系统是x64 sysetm.但是,我以任何CPU"模式编译程序.
但是我无法p/调用任何X86或X64 dll文件.
如何调用X64或X86 dll?
谢谢.

好吧,
我使用C#构建一些GUI和一些x64图像处理代码(已损坏).
但是我也想调用opencv函数.我尝试使用emgu或opencvsharp来调用dll文件.
但是我失败了. >

亲爱的克里斯蒂安·格劳斯(Christian Graus):
如果所有项目都设置为"Any CPU"平台,那么我可以正确调用dll(x64).
谢谢


Hi all:
My Os is x64 sysetm.However I complier my program at "Any CPU" mode.
But I can''t p/invoke any X86 or X64 dll file.
How to do that i can call X64 or X86 dll?
Thanks.

Well,
I use C# to build some GUI and some x64 image processing code(mamaged).
But I also want to call opencv function.I try to use emgu or opencvsharp to call dll file.
But i failed.

解决方案

If your dll is X64, then why not build an X64 exe, given that the DLL is tying you to that platform anyhow ?


dear Christian Graus :
If all project setup "Any CPU" platform then i can call dll(x64) correctly.
thanks


这篇关于如何在平台(任何CPU)上p/invoke dll(x64)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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