我可以加载一个32位的DLL到Windows上的64位进程?进程、加载、DLL、Windows

2023-09-02 01:37:33 作者:断灵翼莫笑

我最近升级C#窗口服务作为一个64位的.NET进程中运行。通常情况下,这将是微不足道的,但该系统使用了一个32位的DLL用C ++编写的。这不是一个选项,这个DLL转换为64位,所以我包的DLL在一个单独的32位.NET程序,并通过远程露出了.NET接口。

I recently upgraded a c# windows service to run as a 64 bit .net process. Normally, this would be trivial, but the system makes use of a 32-bit DLL written in C++. It is not an option to convert this DLL to 64 bit, so I wrapped the DLL in a separate 32 bit .net process and exposed a .net interface via remoting.

这是一个相当可靠的解决方案,但我想preFER运行系统作为一个单一的过程。有什么办法,我可以载入我的32位的DLL到64位进程和(可能通过某种的thunk层)直接访问它?

This is quite a reliable solution, but I would prefer to run the system as a single process. Is there any way I can load my 32 bit DLL into a 64 bit process and access it directly (perhaps through some sort of thunking layer)?

推荐答案

没有,你不能。

http://blogs.msdn.com/oldnewthing/archive/2008/10/20/9006720.aspx

 
精彩推荐
图片推荐