简体   繁体   English

使用Visual Studio运行引用32位dll的64位程序-C#

[英]Running a 64bit program referencing a 32bit dll using visual studio - C#

I am currently facing a problem where I am referencing a 32bit dll. 我目前在引用32位dll时遇到问题。 I tried changing the platform to 86bit which works fine but the requirements are to use a 64bit or 'Any CPU'. 我尝试将平台更改为86bit,这可以正常工作,但要求是使用64bit或“任何CPU”。 When I use the 'Any CPU' platform it somehow does not pick up the dll 当我使用“任何CPU”平台时,都无法以某种方式获取dll

Is there a way of using a 32bit dll in 64bit program? 有没有一种方法可以在64位程序中使用32位dll? I also read about a workaround of 'wrapping' which was not clear... can someone elaborate 我还阅读了有关“包装”的变通方法,目前尚不清楚...有人可以详细说明吗

Is there a way of using a 32bit dll in 64bit program? 有没有一种方法可以在64位程序中使用32位dll?

In the same process : No. * 在同一过程中 :否*

However, you could host the dll in a separate child process via something like the Add In Framework (which supports out of process workers). 但是,您可以通过诸如Add In Framework(它支持进程外工作人员)之类的东西将dll托管在一个单独的子进程中。

* Note, I am assuming this dll is either natively compiled, or .NET but compiled explicitly for 32bit only. *注意,我假设此dll是本机编译的或.NET,但仅针对32位显式编译。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM