32-bit DLL Library Not Working with 32-bit AutoHotkey

Talk about things C/C++, some related to AutoHotkey
1100++
Posts: 78
Joined: 10 Feb 2018, 19:05

32-bit DLL Library Not Working with 32-bit AutoHotkey

03 Apr 2020, 00:07

I wrote some C++ functions into a couple of DLLs that I call from AutoHotkey. One is a 64-bit DLL that I use with 64-bit AutoHotkey, and the other is its 32-bit counterpart that I use with 32-bit AutoHotkey. While the 64-bit version seems to work fine (my version of Windows is 64-bit), the 32-version seems to be having some problems. If I pass a pointer to a numeric variable (a "UPtr*", for example) to one of my functions in the 32-bit DLL, either the function call fails, setting ErrorLevel to 0xC0000005, or the entire script crashes.

I've also noticed that when I open my 32-bit DLL in Dependency Walker, DW displays two error messages that don't show up when I open the 64-bit version:

Code: Select all

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Here's a screenshot of the Dependency Walker window with the 32-bit DLL open:
Dependency Walker Error Window.png
Might these errors shown by Dependency Walker have anything to do with the problem I'm having? Does anyone have any idea how I might fix this?

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 8 guests