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 de

Re: [twsocket] Program to thread

2006-06-05 Thread Fastream Technologies
ul > > > - Original Message - > From: "Francois PIETTE" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Monday, June 05, 2006 11:03 AM > Subject: Re: [twsocket] Program to thread > > >>> What is the correct way to convert

Re: [twsocket] Program to thread

2006-06-05 Thread Paul
gt; To: "ICS support mailing" 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)

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 b

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.mes

Re: [twsocket] Program to thread

2006-06-05 Thread Paul
Hi Arno > not required, you can also use PostThreadMessage(). Can I trap my own messages within the message pump here ? > Think fully event-driven ;-) It' the only I can ;-) Paul -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/l

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. > - HttpCli.Mult

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 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 Pau

Re: [twsocket] Program to thread

2006-06-05 Thread Fastream Technologies
- Original Message - From: "Paul" <[EMAIL PROTECTED]> To: Sent: Monday, June 05, 2006 11:51 AM Subject: [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) Necessary to be done in