Re: [twsocket] TWsocket in Threads and ShellExecute

2006-02-18 Thread Arno Garrels
If you still want to Suspend the thread another option may be to call ThreadDetach before Suspend and ThreadAttach when the thread is resumed again. Something like this: Create it; WSocket1.ThreadDetach; while not Terminated do begin WSocket1.ThreadAttach; WSocket1.Send(So

Re: [twsocket] TWsocket in Threads and ShellExecute

2006-02-18 Thread Wilfried Mestdagh
Hello, In additions to the reply of Francois: In the rare occasions that I have a hidden window in a thread that has to be reused whole the time, I dont go into suspended but just do nothing. The messagepump I uses, uses GetMessage(), so if no message is post then GetMessage is in a wait state wit

Re: [twsocket] TWsocket in Threads and ShellExecute

2006-02-18 Thread Francois PIETTE
has the advantage of a better layered application, easier to develop and maintain. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "asvetov" <[EMAIL PROTECTED]> To: Sent: Friday, February 17, 2006 9:58 PM Subject: Re: [twsocket] TWsocke

Re: [twsocket] TWsocket in Threads and ShellExecute

2006-02-17 Thread asvetov
Hello, Wilfried! Thank you for clarifying this. Do you have any recommendations how to avoid this behaviour? I think many people works with different ICS components in threads and reuse threads (doing suspend/resume) and all they have this problem? Or I▓ am the only one who haven▓t solved this

Re: [twsocket] TWsocket in Threads and ShellExecute

2006-02-17 Thread Wilfried Mestdagh
Hello asvetov, This is normal behaviour in windows. If you create a (hidden) window in a thread you must pump messages or your system can deadlock. If you suspend a thread having a window then it cannot pump, so that is what you experiance. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/

[twsocket] TWsocket in Threads and ShellExecute

2006-02-17 Thread asvetov
Hello all! Does somebody have this problem: if twsocket is created in thread and the thread goes to suspend mode, than if you try to call i.e. explorer thru shellexecute, the whole applications hangs some minutes. I assume it has something todo with Window Handle Allocation in TWSocket, but not