Page 1 of 1

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

Posted: 04 Jan 2019, 14:29
by swagfag

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?

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

Posted: 05 Jan 2019, 10:05
by swagfag
well, i guess, i could work around that by using NewThread() or ThreadObj() instead

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

Posted: 06 Jan 2019, 18:49
by HotKeyIt
This has been fixed now, thanks for reporting ;)

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

Posted: 06 Jan 2019, 20:56
by swagfag
i had resorted to using ThreadObj() with a global var in it to serve as a replacement for AhkThread.AhkReady() meanwhile

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

Posted: 07 Jan 2019, 10:57
by swagfag
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

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

Posted: 07 Jan 2019, 16:17
by HotKeyIt
Thanks for checking, there was a small bug that has been fixed now.

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

Posted: 07 Jan 2019, 16:29
by swagfag
yep both v1 and v2 x64 work now. it wasnt impeding my workflow, but thanks for the timely fix anyway