我需要从 64 位 exe 访问 32 位 dll [英] I need to access a 32bit dll from a 64bit exe

查看:31
本文介绍了我需要从 64 位 exe 访问 32 位 dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我阅读了有关代理进程的所有内容,并且能够创建代理 COM,但它要么全部在 32 位下运行,要么全部在 64 位下运行.

I know I read all about surrogate process, and I was able to create a surrogate COM but it either all works in 32bit or all works in 64bit.

正确的结构是什么?

1) 32.dll <- 64.com <- 64.exe2) 32.dll <- 32.com <- 64.exe

1) 32.dll <- 64.com <- 64.exe 2) 32.dll <- 32.com <- 64.exe

以上两种方法我都试过了,但是没有成功调用32.dll?

I tried both of the above but I did not succeed to call the 32.dll?

推荐答案

我不太了解您所指的代理 COM,但我已经解决了这个问题(使用 64 位 exe 中的 32 位 dll)中间的COM对象:

I'm not too informed about the surrogate COM you refer to but I've solved this problem (Using a 32bit dll from a 64bit exe) by introducing a COM object in the middle:

32.dll <-> 32bit-out-of-process-com-server.exe <-> 64.exe.

32.dll <-> 32bit-out-of-process-com-server.exe <-> 64.exe.

抱歉,这可能是您所说的 32.com,不确定,但请确保中间 COM 对象位于 .exe(进程外)而不是 dll 中.这与您无法将原始 32.dll 加载到 64 位进程的原因相同.

Sorry this might be what you mean by 32.com, not sure, but make sure the intermediate COM object lives in an .exe (out of process) and not in a dll. This is for the same reason you can't load the original 32.dll into the 64 bit process.

这篇关于我需要从 64 位 exe 访问 32 位 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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