[AHK v1] Bug: InjectAhkDll() crashes target process on x64 without full path to AutoHotkey.dll
Posted: 29 Jan 2019, 16:36
https://autohotkey.com/board/topic/85304-solvedget-other-processs-working-dir/page-3#entry544650
If We run this script without entering full path to AutoHotkey.dll then target program will crash on x64 bit.
Tested on AHK_L.
Does not work:
Work:
If We run this script without entering full path to AutoHotkey.dll then target program will crash on x64 bit.
Tested on AHK_L.
Does not work:
Code: Select all
Run notepad.exe,,,PID
rThread:=InjectAhkDll(PID, "AutoHotkey.dll","#Persistent`nMsgBox % A_WorkingDir")
InjectAhkDll(PID,dll:="AutoHotkey.dll",script:=0, deleteThread := false)
{
...
}
Code: Select all
Run notepad.exe,,,PID
rThread:=InjectAhkDll(PID, A_ScriptDir "\AutoHotkey.dll","#Persistent`nMsgBox % A_WorkingDir")
InjectAhkDll(PID,dll:="AutoHotkey.dll",script:=0, deleteThread := false)
{
...
}