Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

DllCall Failing x64


  • Please log in to reply
3 replies to this topic
RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
I have been noticing that some people on x64 systems are having troubles running some of my scripts. At first i thought that it was permission problems, but no i have setup a virtual machine and after checking permissions and everything it doesnt seem to work.
the line having problems looks like this:

SCIModule:=DllCall("LoadLibrary", "Str", DllPath)

Thing is: if i run the same script with Autohotkey x32, it works without issues.
Are there any problems with DllCall and x64 bit environments?
Both versions of AHK are Unicode.
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
32-bit programs can only load 32-bit DLLs, and 64-bit programs likewise can only load 64-bit DLLs. You should check out if there's a 64-bit version of your DLL.

RaptorX
  • Members
  • 751 posts
  • Last active: Feb 19 2015 02:47 AM
  • Joined: 19 Feb 2010
ohhh I see!
and there is no way whatsoever to load a x32bit dll with AHK x64? i mean like a force method?
Im afraid there is no x64 version of the scintilla component (i think i saw someone in the mailing list saying he has a visual studio project for x64) but well i guess you are right. It doesnt make sense to load a x32 dll on to a x64 program.. :P
AutoHotkey Toolkit [Main Project]
Scintilla Wrapper
LexAHKL

fincs
  • Moderators
  • 1662 posts
  • Last active:
  • Joined: 05 May 2007
There is no way to load foreign-bitness DLLs into a process. By the way, SciTE4AutoHotkey comes with a 64-bit build of SciTE and Scintilla that is automatically installed on 64-bit OSes. However, it's going to be removed in v3.0.01 due to the plain fact that it adds little to no benefit and makes the installation package unnecessarily bigger.