从 32 位进程调用 64 位 dll 上的 LoadLibrary [英] Calling LoadLibrary on a 64-bit dll from a 32-bit process

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

问题描述

我有一个 32 位 exe,它需要在检测到操作系统是 64 位时动态加载 64 位 dll.这可以通过 LoadLibrary 实现吗?如果没有,还有其他方法可以实现相同的目标吗?

I have a 32-bit exe that needs to dynamically load a 64-bit dll when it detects that the operating system is 64-bit. Is this possible through LoadLibrary? If not, is there another way to accomplish the same goal?

推荐答案

如前所述,32 位代码无法在同一进程中加载​​ 64 位代码.您必须将其加载到不同的进程中(CreateProcess() ?)并使用 IPC 进行协调.

As previously mentioned, 32-bit code cannot load 64-bit code in the same process. You'll have to load it into a different process (CreateProcess() ?) and use IPC to coordinate.

这篇关于从 32 位进程调用 64 位 dll 上的 LoadLibrary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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