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

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

问题描述

我知道我读了所有关于代理过程,我能够创建一个代理COM,但它或者都工作在32位或所有工作在64位。



将是正确的结构?



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



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

解决方案

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



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

对不起这可能是你的意思是32.com,不确定,但确保中间的COM对象生活在一个.exe(过程中),而不是在dll。这是因为同样的原因,你不能加载到64位进程原来的32.dll。


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.

What would be the correct structure?

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

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

解决方案

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.

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天全站免登陆