Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Arno Garrels
Frans van Daalen wrote:
> m...I see some light in the tunnel now, will try some new thinks
> according to this code to see if that is indeed the end of the tunnel or
> the train :-)
 
Probably just the train you should jump on ;) Try to think fully event-driven.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Arno Garrels
Wilfried Mestdagh wrote:
> Hello Arno,
> 
>> Eh, my OE has no syntax check, why?
> 
> ;-)
> We should write our own with TSmtpCli and syntax check.

OK, count me in, it should at least support Pascal, C, C++, and C#.
May be we have some minutes at the next weekend ;)

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Frans van Daalen
thanks for the extra info
- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, April 05, 2006 8:20 PM
Subject: Re: [twsocket] wm_quit in requestdone in thread


> Hello,
>
> Release post a message to the component's hidden window to destroy it.
> The destruction is done in the message handler.
>
> WM_QUIT will exit the message loop if using GetMessage, and it will also
> terminate program for example, but it is not the same. It is pure
> depandant of what the programmer do in his message pump.
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Wednesday, April 5, 2006, 18:41, Fastream Technologies wrote:
>
>> WM_QUIT has the same effect as Release!
>
>> Regards,
>
>> SZ
>
>> - Original Message - 
>> From: "Frans van Daalen" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Wednesday, April 05, 2006 7:21 PM
>> Subject: Re: [twsocket] wm_quit in requestdone in thread
>
>
>>> - Original Message - 
>>> From: "Fastream Technologies" <[EMAIL PROTECTED]>
>>> To: "ICS support mailing" 
>>> Sent: Wednesday, April 05, 2006 6:05 PM
>>> Subject: Re: [twsocket] wm_quit in requestdone in thread
>>>
>>>
>>>> Hello,
>>>>
>>>> Why don't you use the Release method of VCL in the requestdone?
>>>>
>>>> Regards,
>>>>
>>>> SZ
>>>
>>> Isn't the release the start of a destroy? The http component is re-used
>>> until de thread execute recieves no new items to be processed
>>>
>>>>
>>>> - Original Message - 
>>>> From: "Frans van Daalen" <[EMAIL PROTECTED]>
>>>> To: "ICS support mailing" 
>>>> Sent: Wednesday, April 05, 2006 6:44 PM
>>>> Subject: [twsocket] wm_quit in requestdone in thread
>>>>
>>>>
>>>>>I have the following code
>>>>>
>>>>> procedure TConsumerThread.Execute;
>>>>> ...some code
>>>>> while GetMessage(Msg, 0, 0, 0) do
>>>>> begin
>>>>>TranslateMessage(Msg);
>>>>>DispatchMessage(Msg);
>>>>>if Msg.Message = WM_REQUEST then
>>>>>Begin
>>>>> ...some code
>>>>> http.GetASync;
>>>>> http.CtrlSocket.MessageLoop;
>>>>> ...some code
>>>>>end;
>>>>> end;
>>>>>
>>>>>
>>>>> in the requestdone I have
>>>>>
>>>>>PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
>>>>>
>>>>> This wm_quit will hoverever also stop the thread execute...how can i
>>>>> solve
>>>>> that ?
>>>>>
>>>>>
>>>>> -- 
>>>>> To unsubscribe or change your settings for TWSocket mailing list
>>>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>>>> Visit our website at http://www.overbyte.be
>>>>
>>>> -- 
>>>> To unsubscribe or change your settings for TWSocket mailing list
>>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>>> Visit our website at http://www.overbyte.be
>>>>
>>>>
>>>
>>>
>>> -- 
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Frans van Daalen

- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, April 05, 2006 7:46 PM
Subject: Re: [twsocket] wm_quit in requestdone in thread


> Eh, my OE has no syntax check, why?
>
> const
>WM_MY_MESSAGE_AFTER_RQ_DONE = WM_USER + 1;
>WM_WHATEVER_MSG = WM_USER + 2;
>
> while GetMessage(Msg, 0, 0, 0) do
> begin
>if Msg.Message = WM_REQUEST then
>begin
>...some code
>http.GetASync;
>end
>else if Msg.Message = WM_MY_MESSAGE_AFTER_RQ_DONE then
>...some code after requestdone
>else if Msg.Message = WM_WHATEVER_MSG then
>...??
>else begin
>TranslateMessage(Msg);
>DispatchMessage(Msg);
>end;
> end;
>
>
m...I see some light in the tunnel now, will try some new thinks 
according to this code to see if that is indeed the end of the tunnel or the 
train :-)

Thanks for the help! 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Wilfried Mestdagh
Hello,

Release post a message to the component's hidden window to destroy it.
The destruction is done in the message handler.

WM_QUIT will exit the message loop if using GetMessage, and it will also
terminate program for example, but it is not the same. It is pure
depandant of what the programmer do in his message pump.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, April 5, 2006, 18:41, Fastream Technologies wrote:

> WM_QUIT has the same effect as Release!

> Regards,

> SZ

> - Original Message - 
> From: "Frans van Daalen" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, April 05, 2006 7:21 PM
> Subject: Re: [twsocket] wm_quit in requestdone in thread


>> - Original Message - 
>> From: "Fastream Technologies" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Wednesday, April 05, 2006 6:05 PM
>> Subject: Re: [twsocket] wm_quit in requestdone in thread
>> 
>> 
>>> Hello,
>>>
>>> Why don't you use the Release method of VCL in the requestdone?
>>>
>>> Regards,
>>>
>>> SZ
>> 
>> Isn't the release the start of a destroy? The http component is re-used
>> until de thread execute recieves no new items to be processed
>> 
>>>
>>> - Original Message - 
>>> From: "Frans van Daalen" <[EMAIL PROTECTED]>
>>> To: "ICS support mailing" 
>>> Sent: Wednesday, April 05, 2006 6:44 PM
>>> Subject: [twsocket] wm_quit in requestdone in thread
>>>
>>>
>>>>I have the following code
>>>>
>>>> procedure TConsumerThread.Execute;
>>>> ...some code
>>>> while GetMessage(Msg, 0, 0, 0) do
>>>> begin
>>>>TranslateMessage(Msg);
>>>>DispatchMessage(Msg);
>>>>if Msg.Message = WM_REQUEST then
>>>>Begin
>>>> ...some code
>>>> http.GetASync;
>>>> http.CtrlSocket.MessageLoop;
>>>> ...some code
>>>>end;
>>>> end;
>>>>
>>>>
>>>> in the requestdone I have
>>>>
>>>>PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
>>>>
>>>> This wm_quit will hoverever also stop the thread execute...how can i
>>>> solve
>>>> that ?
>>>>
>>>>
>>>> -- 
>>>> To unsubscribe or change your settings for TWSocket mailing list
>>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>>> Visit our website at http://www.overbyte.be
>>>
>>> -- 
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>>>
>>> 
>> 
>> 
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Wilfried Mestdagh
Hello Arno,

> Eh, my OE has no syntax check, why?

;-)
We should write our own with TSmtpCli and syntax check.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Arno Garrels
Eh, my OE has no syntax check, why?

const
WM_MY_MESSAGE_AFTER_RQ_DONE = WM_USER + 1;
WM_WHATEVER_MSG = WM_USER + 2;

while GetMessage(Msg, 0, 0, 0) do
begin
if Msg.Message = WM_REQUEST then
begin
...some code
http.GetASync;
end
else if Msg.Message = WM_MY_MESSAGE_AFTER_RQ_DONE then
...some code after requestdone
else if Msg.Message = WM_WHATEVER_MSG then
...??
else begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


Arno Garrels wrote:
> Why do you call WSocket's message pump from within
> your own? GetMessage returns FALSE after receiving WM_QUIT.
> So you could just post another, custom message.
> 
> Try this instead:
> 
> while GetMessage(Msg, 0, 0, 0) do
> begin
> if Msg.Message = WM_REQUEST then
> Begin
> ...some code
> http.GetASync;
> ...some code
> end
> else if WM_MY_MESSAGE then
> ...some code after requestdone
> else begin
> TranslateMessage(Msg);
> DispatchMessage(Msg);
> end;
> end;
> 
> Frans van Daalen wrote:
>> I have the following code
>> 
>> procedure TConsumerThread.Execute;
>> ...some code
>>  while GetMessage(Msg, 0, 0, 0) do
>>  begin
>> TranslateMessage(Msg);
>> DispatchMessage(Msg);
>> if Msg.Message = WM_REQUEST then
>> Begin
>> ...some code
>>  http.GetASync;
>>  http.CtrlSocket.MessageLoop;
>> ...some code
>> end;
>>  end;
>> 
>> 
>> in the requestdone I have
>> 
>> PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
>> 
>> This wm_quit will hoverever also stop the thread execute...how can i
>> solve that ?
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Arno Garrels
Why do you call WSocket's message pump from within
your own? GetMessage returns FALSE after receiving WM_QUIT.
So you could just post another, custom message. 

Try this instead:  
 
while GetMessage(Msg, 0, 0, 0) do
begin
if Msg.Message = WM_REQUEST then
Begin
...some code
http.GetASync;
...some code
end
else if WM_MY_MESSAGE then
...some code after requestdone  
else begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;

Frans van Daalen wrote:
> I have the following code
> 
> procedure TConsumerThread.Execute;
> ...some code
>  while GetMessage(Msg, 0, 0, 0) do
>  begin
> TranslateMessage(Msg);
> DispatchMessage(Msg);
> if Msg.Message = WM_REQUEST then
> Begin
> ...some code
>  http.GetASync;
>  http.CtrlSocket.MessageLoop;
> ...some code
> end;
>  end;
> 
> 
> in the requestdone I have
> 
> PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
> 
> This wm_quit will hoverever also stop the thread execute...how can i solve
> that ?
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Fastream Technologies
WM_QUIT has the same effect as Release!

Regards,

SZ

- Original Message - 
From: "Frans van Daalen" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, April 05, 2006 7:21 PM
Subject: Re: [twsocket] wm_quit in requestdone in thread


> - Original Message - 
> From: "Fastream Technologies" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, April 05, 2006 6:05 PM
> Subject: Re: [twsocket] wm_quit in requestdone in thread
> 
> 
>> Hello,
>>
>> Why don't you use the Release method of VCL in the requestdone?
>>
>> Regards,
>>
>> SZ
> 
> Isn't the release the start of a destroy? The http component is re-used 
> until de thread execute recieves no new items to be processed
> 
>>
>> - Original Message ----- 
>> From: "Frans van Daalen" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Wednesday, April 05, 2006 6:44 PM
>> Subject: [twsocket] wm_quit in requestdone in thread
>>
>>
>>>I have the following code
>>>
>>> procedure TConsumerThread.Execute;
>>> ...some code
>>> while GetMessage(Msg, 0, 0, 0) do
>>> begin
>>>TranslateMessage(Msg);
>>>DispatchMessage(Msg);
>>>if Msg.Message = WM_REQUEST then
>>>Begin
>>> ...some code
>>> http.GetASync;
>>> http.CtrlSocket.MessageLoop;
>>> ...some code
>>>end;
>>> end;
>>>
>>>
>>> in the requestdone I have
>>>
>>>PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
>>>
>>> This wm_quit will hoverever also stop the thread execute...how can i 
>>> solve
>>> that ?
>>>
>>>
>>> -- 
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>>
>> 
> 
> 
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Frans van Daalen
- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, April 05, 2006 6:05 PM
Subject: Re: [twsocket] wm_quit in requestdone in thread


> Hello,
>
> Why don't you use the Release method of VCL in the requestdone?
>
> Regards,
>
> SZ

Isn't the release the start of a destroy? The http component is re-used 
until de thread execute recieves no new items to be processed

>
> - Original Message - 
> From: "Frans van Daalen" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, April 05, 2006 6:44 PM
> Subject: [twsocket] wm_quit in requestdone in thread
>
>
>>I have the following code
>>
>> procedure TConsumerThread.Execute;
>> ...some code
>> while GetMessage(Msg, 0, 0, 0) do
>> begin
>>TranslateMessage(Msg);
>>DispatchMessage(Msg);
>>if Msg.Message = WM_REQUEST then
>>Begin
>> ...some code
>> http.GetASync;
>> http.CtrlSocket.MessageLoop;
>> ...some code
>>end;
>> end;
>>
>>
>> in the requestdone I have
>>
>>PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
>>
>> This wm_quit will hoverever also stop the thread execute...how can i 
>> solve
>> that ?
>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
> 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Fastream Technologies
Hello,

Why don't you use the Release method of VCL in the requestdone?

Regards,

SZ

- Original Message - 
From: "Frans van Daalen" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, April 05, 2006 6:44 PM
Subject: [twsocket] wm_quit in requestdone in thread


>I have the following code
>
> procedure TConsumerThread.Execute;
> ...some code
> while GetMessage(Msg, 0, 0, 0) do
> begin
>TranslateMessage(Msg);
>DispatchMessage(Msg);
>if Msg.Message = WM_REQUEST then
>Begin
> ...some code
> http.GetASync;
> http.CtrlSocket.MessageLoop;
> ...some code
>end;
> end;
>
>
> in the requestdone I have
>
>PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);
>
> This wm_quit will hoverever also stop the thread execute...how can i solve
> that ?
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] wm_quit in requestdone in thread

2006-04-05 Thread Frans van Daalen
I have the following code

procedure TConsumerThread.Execute;
...some code
 while GetMessage(Msg, 0, 0, 0) do
 begin
TranslateMessage(Msg);
DispatchMessage(Msg);
if Msg.Message = WM_REQUEST then
Begin
...some code
 http.GetASync;
 http.CtrlSocket.MessageLoop;
...some code
end;
 end;


in the requestdone I have

PostMessage((Sender as THttpCli).CtrlSocket.Handle, WM_QUIT, 0, 0);

This wm_quit will hoverever also stop the thread execute...how can i solve 
that ? 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be