Exported function to retrieve the value of a variable as string.
OutputVar := DllCall("Module\ahkgetvar", "Str", "VarName", "UInt", GetVarPointer, "CDecl Str")Function Example: OutputVar := DllCall("AutoHotkey.dll\ahkgetvar", "Str", "MyVar", "UInt", 0 ,"CDecl Str") Result := DllCall("AutoHotkey.exe\ahkgetvar", "Str", "MyVar", "UInt", 0, "CDecl Str")
The name of variable in which to store the value of variable as string or variable pointer if GetvarPointer is 1 / true.
The name of the variable to get pointer or contents from.
1 / true to receive a pointer to variable, FALSE / NULL / 0 to receive content of variable, similar to GetVar.
dllpath:=A_AhkDir "\AutoHotkey.dll" DllCall("LoadLibrary","Str",dllpath) ; Load the AutoHotkey module. ThreadID:=DllCall(dllpath "\NewThread","Str","","Str","","Str","","CDecl") ; start a new thread from file. DllCall(dllpath "\ahkassign","Str","var","Str","value","Uint",ThreadID,"CDecl") ; assing value to var MsgBox DllCall(dllpath "\ahkgetvar","Str","var","UInt",0,"Uint",ThreadID,"CDecl") ; wait for the thread to exit ; Same example like above using NewThread function dll:=NewThread(,,,,dllpath) dll.ahkassign("var","value") MsgBox dll.ahkgetvar.var