thanks Mike, but i talk about your source code here :)
how could you explain about hThread in your LOCAL?

thanks
Posted on 2003-01-15 21:03:22 by dion
Agree, this code is not correct. I never close thread by
invoke TerminateThread, hThread, 0 ; in WM_CLOSE
Program works while thread close himself by
invoke ExitThread, 0
But what can you recommend me? I must download variable number of files. I can use array of hThreads and use those by counter. Another way is to write module for file downloading and another module that starts the first when it needs. Have you another ideas?

Thanks,
Mike
Posted on 2003-01-16 07:41:05 by Mike
hi Mike, sorry, but i dont dispute the method. but, what i dont understand is how can hThread LOCAL var in stack doesnt get overwritten? like i said before, is it the dlgproc would be looped in somekind of messagepump? i mean it would be called and exit, and get called and exit, get called and exit and soon. so while it exit, would it free the stack? i dont understand in that point. would you mind telling me what wrong with my concept?

thanks
Posted on 2003-01-16 20:23:26 by dion
Hi, Dion!

hThread will lost so <invoke TerminateThread, hThread, 0> is not effective.
But 2 or more threads will use variables in different addresses. So there
are no problems while thread starts and stops himself normally, only. When
dialog program starts it allocates memory for local variables and automatically
free it when ends. Local variables must uses only for temporary variables.
hThread (hFile, hMem) in THIS CASE must not be locals, that's MY error.
My concept was wrong and I'll rewrite this program!

Mike
Posted on 2003-01-17 10:45:10 by Mike
hi Mike, sorry to bother you again ;)
uhm... maybe i'm wrong looking in your code, gotta look more :o
wierd, if you said it is wrong, but it is work, eh?
argh... i'm eager to code something... but darn i dont have msdn in my hand :(
Posted on 2003-01-17 20:42:17 by dion
Hi!
There are a lot of programs that works. But 75% of those works not fully correctly because have some bugs. E.g. another my program (recoder) sometimes blew up (with fire and not only :-)> ) Approximately one hour ago it has been rewritten and now problem disappeared.
Msdn. I have no msdn too. I use only .hlp files but sometimes read msdn information via internet.
Mike
Posted on 2003-01-18 09:04:13 by Mike