在C#中的64位应用程序的32位的DLL [英] 32bit dll in 64bit application in c#

查看:1016
本文介绍了在C#中的64位应用程序的32位的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好
我想在C#中64位应用程序,我wan't它使用C ++ Builder中(32位)创建的DLL。但是,当我尝试加载DLL的应用程序崩溃。当内置的32bit它的工作原理。有没有一种方法来使用这个DLL的64位应用程序?

Hello
I want to create a 64bit application in c# and I wan't to use in it a dll created in C++ builder (32bit). But when I try to load the dll the application crashes. When built in 32bit it works. Is there a way to use this dll in a 64bit app?

推荐答案

没有,这是不可能的。 Windows中的过程可以是32位或64位,它只能加载DLL的哪些比赛。任何试图加载DLL不匹配将失败,并产生错误。

No this is not possible. A process in Windows is either 32 or 64 bit and it can only load DLL's which match. Any attempt to load a DLL which does not match will fail and produce an error.

如果你需要c您需要使用多个进程,以配合32位和64位$ C $。在这种情况下,虽然我只想让应用32位或DLL的64位

If you need to match 32 and 64 bit code you need to use multiple processes. In this case though I would just make the application 32 bit or the DLL 64 bit

这篇关于在C#中的64位应用程序的32位的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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