Code: Select all
f:=AhkThread()
s:="
(
#Persistent
;v:=DynaCall(MemoryGetProcAddress(A_MemoryModule,"addScript"),"ut==siui","",0,A_ThreadID)
;v["a:=1",1] ;Use V normal
AhkSelf().add("a:=1",1)
return
ahkself(){
return {add:DynaCall(MemoryGetProcAddress(A_MemoryModule,"addScript"),"ut==siui","",0,A_ThreadID)}
}
t(list*){
static _f:=(onmessage(74,A_ScriptHwnd,_f:=func("t"),250),_f)
MsgBox
o:=[] ;Delete this line becomes normal
return
a(list*){
o:=1 ;Delete this line becomes normal
}
}
)"
f.ahktextdll(s)
MsgBox "Start Test"
exe:=fileread(a_ahkpath,"RAW")
i:=VarSetCapacity(exe)
VarSetCapacity(r, 3*A_PtrSize, 0)
,NumPut(i,r, A_PtrSize),NumPut(&exe,r,2*A_PtrSize)
XX:=&r ; The value of XX is 0 normal
SendMessage_(f.ahkgetvar("A_ScriptHwnd"),74,1,XX)
MsgBox 2
---------------------------
Error: CONTINUABLE EXCEPTION_ACCESS_VIOLATION
Mouse and Keyboard hooks have been disabled.
- Press yes to exit thread and continue execution.
- Press no to continue thread (debug).
- Press cancel to exit application.
Exception was caused in thread id: 6304
Line: 5
LineFile: #Persistent
;v:=DynaCall(MemoryGetProcAddress(A_MemoryModule,"addScript"),"ut==siui","",0,A_ThreadID)
;v["a:=1",1] ;Use V normal
AhkSelf().add("a:=1",1)
return
ahkself(){
return {add:DynaCall(MemoryGetProcAddress(A_MemoryModule,"addScript"),"ut==siui","",0,A
---------------------------