[英]Creating a 32 bit wrapper for a 64 bit dll. Is this possible?
I have a couple of dlls that are x64
, with the x86
versions not being released yet. 我有几个
x64
的dll,而x86
版本尚未发布。 I want to use these in a x86
environment. 我想在
x86
环境中使用它们。 There is no way to change any of the platforms of those factors. 无法更改这些因素的任何平台。
I have tried searching the Internet, but to no avail. 我曾尝试搜索Internet,但无济于事。 What I want to do is somehow create a
x86
library that can communicate with the x64
ones. 我想要做的是以某种方式创建一个可以与
x64
通讯的x86
库。 Is this possible at all? 这有可能吗? If so, how?
如果是这样,怎么办?
Preferably, the wrapper will be in C#
code, though it has to be able to access C++
dlls. 包装程序最好使用
C#
代码,尽管它必须能够访问C++
dll。 (The x64
libraries are written in unmanaged C++
.) (
x64
库是用unmanaged C++
编写的。)
You cannot do this within a single process. 您不能在单个过程中执行此操作。 That's because a 32 bit process can only load 32 bit modules, and a 64 bit process can only load 64 bit modules.
这是因为32位进程只能加载32位模块,而64位进程只能加载64位模块。
The only way for your 64 bit code to call 32 bit code, and vice versa, is to use an out-of-proc solution. 64位代码调用32位代码(反之亦然)的唯一方法是使用过程外解决方案。 For example an out-of-proc COM server.
例如,进程外COM服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.