Re: [twsocket] Program to thread

2006-06-05 Thread Paul
Thanks for the fast response. However, I need all the items listed, including the hidden window. In the OnRequestdone event, I sometimes need to restart the the same operation which I can't do from within the onRequestDone event. I just wanted to know if there was something else I should do

Re: [twsocket] Program to thread

2006-06-05 Thread Francois PIETTE
What is the correct way to convert an existing program with 1 HttpCli in async mode to a thread? - HttpCli.create(nil) Of course. Be sure to create it from the thread's Execute method. - HttpCli.Multithreaded:= true OK. - place a message pump in the thread's execute procedure. OK. -

Re: [twsocket] Program to thread

2006-06-05 Thread Arno Garrels
Paul wrote: What is the correct way to convert an existing program with 1 HttpCli in async mode to a thread? - HttpCli.create(nil) Either create it in thread's Execute procedure or create it in another thread, call ThreadDetach, and in thread's Execute call ThreadAttach. -

Re: [twsocket] Program to thread

2006-06-05 Thread Arno Garrels
Paul wrote: Hi Arno not required, you can also use PostThreadMessage(). Can I trap my own messages within the message pump here ? No problem i.e.: while GetMessage(Msg, 0, 0, 0) do begin if Msg.message = WM_USER + 1 then TWSocket(Msg.WParam).ThreadAttach else if Msg.message

Re: [twsocket] Program to thread

2006-06-05 Thread Arno Garrels
Arno Garrels wrote: Paul wrote: Hi Arno not required, you can also use PostThreadMessage(). Can I trap my own messages within the message pump here ? No problem i.e.: Also make sure thread's message queue is initialized before PostThreadMessage(). First line in Execute could be

Re: [twsocket] Program to thread

2006-06-05 Thread Paul
@elists.org Sent: Monday, June 05, 2006 11:03 AM Subject: Re: [twsocket] Program to thread What is the correct way to convert an existing program with 1 HttpCli in async mode to a thread? - HttpCli.create(nil) Of course. Be sure to create it from the thread's Execute method

Re: [twsocket] Program to thread

2006-06-05 Thread Fastream Technologies
: Re: [twsocket] Program to thread - HttpCli.create(nil) Of course. Be sure to create it from the thread's Execute method. Just being curious : why does is have to be created in the thread's execute procedure ? Paul - Original Message - From: Francois PIETTE [EMAIL PROTECTED

Re: [twsocket] Program to thread

2006-06-05 Thread Francois PIETTE
Of course. Be sure to create it from the thread's Execute method. Just being curious : why does is have to be created in the thread's execute procedure ? As you know, ICS component use hidden window to receive notification messages from winsock and to use internal messages. By Windows