c#中64位应用程序中的32位dll

编程入门 行业动态 更新时间:2024-10-24 16:22:56
本文介绍了c#中64位应用程序中的32位dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好我想在 c# 中创建一个 64 位应用程序,我不想在其中使用在 C++ builder(32 位)中创建的 dll.但是当我尝试加载 dll 时,应用程序崩溃了.当内置 32 位时,它可以工作.有没有办法在 64 位应用程序中使用这个 dll?

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.

如果需要匹配 32 位和 64 位代码,则需要使用多个进程.在这种情况下,虽然我只会使应用程序成为 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

本文发布于:2023-11-12 07:34:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580891.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   dll

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!