[AHK_H v2] Bug: cant make DllCalls inside scripts launched by AhkThread() Topic is solved

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

[AHK_H v2] Bug: cant make DllCalls inside scripts launched by AhkThread()

04 Jan 2019, 14:29

Code: Select all

AhkThread("
(
	tick := DllCall("GetTickCount") ; call to nonexistent function
	MsgBox(tick)
)")

Esc::ExitApp()
but if i just run this standalone on the v2 x64 interpreter it works fine:

Code: Select all

tick := DllCall("GetTickCount") ; works, if this was ur main script, and not a thread
MsgBox(tick)
whats going on here? is AhkThread() bugged or do i have to use some other function to run it?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [AHK_H v2] Bug: cant make DllCalls inside scripts launched by AhkThread()

05 Jan 2019, 10:05

well, i guess, i could work around that by using NewThread() or ThreadObj() instead
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [AHK_H v2] Bug: cant make DllCalls inside scripts launched by AhkThread()

06 Jan 2019, 20:56

i had resorted to using ThreadObj() with a global var in it to serve as a replacement for AhkThread.AhkReady() meanwhile
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [AHK_H v2] Bug: cant make DllCalls inside scripts launched by AhkThread()

07 Jan 2019, 10:57

actually, i dont think its working right. i ran the original example again and these errors popped up:
error1
error2
_h v2 x64 on win10 x64, still. it runs fine on v1, i should say

i think MemoryModule.cpp/h and globaldata.cpp/h are misplaced in the root dir
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [AHK_H v2] Bug: cant make DllCalls inside scripts launched by AhkThread()

07 Jan 2019, 16:29

yep both v1 and v2 x64 work now. it wasnt impeding my workflow, but thanks for the timely fix anyway

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 17 guests