In the following Dll code, I wrote the function "WaitThread()" but it freezing the calling program & keep it in the "Windows Task Manager" forever!
Is there any explanation?
Thank you.
Code: Select all
ProcedureDLL DoSomeThing(Num)
; Do something ...
EndProcedure
ProcedureDLL AttachProcess(Instance)
DllThread.l = CreateThread (@DoSomeThing(), 0)
WaitThread(DllThread) ; <<< Causes the Program to freeze in the "Windows Task Manager" forever!
EndProcedure