且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以从32位应用程序访问64位dll?

更新时间:2023-12-01 18:34:34

否。您必须编译两个版本:64位和32位。


I have a Delphi application similar to Taskbar Shuffle that includes a hook dll.

EDIT: This hook DLL communicates with the main app by sending windows messages.

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).

Is it possible for a 32-bit application to access a 64-bit dll?

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.

No. You'll have to compile two versions: 64-bit and 32-bit.