是否可以从 32 位应用程序访问 64 位 dll? [英] Is it possible to access a 64-bit dll from a 32-bit application?
问题描述
我有一个类似于 Taskbar Shuffle 的 Delphi 应用程序,其中包含一个钩子 dll.
I have a Delphi application similar to Taskbar Shuffle that includes a hook dll.
EDIT:此挂钩 DLL 通过发送 Windows 消息与主应用程序通信.
EDIT: This hook DLL communicates with the main app by sending windows messages.
我想添加对 XP 和 Vista x64 的支持,我最初的想法是将 dll 转换为 64 位(使用 FreePascal 编译),但现在保持应用程序为 32 位(Delphi).
I want to add support to XP and Vista x64 and my initial idea was to convert the dll to 64-bit (compiling it with FreePascal) but keep the application 32-bit for now (Delphi).
32 位应用程序是否可以访问 64 位 dll?
Is it possible for a 32-bit application to access a 64-bit dll?
EDIT2:我正在通过 LoadLibrary 加载 dll,所以我想我被卡住了,因为 32 位进程将无法加载 64 位 dll,根据我的情况阅读 Lars Truijens 指向的链接,了解以下答案之一.
EDIT2: I'm loading the dll via LoadLibrary so I guess I'm stuck since a 32-bit process won't be able to load a 64-bit dll, according with what I read on the link pointed by Lars Truijens on one of the answers below.
推荐答案
没有.您必须编译两个版本:64 位和 32 位.
No. You'll have to compile two versions: 64-bit and 32-bit.
这篇关于是否可以从 32 位应用程序访问 64 位 dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!