Sorry but this was wrong. I found the solution:
If X=0 Then
Begin
If ForceSleep Then
begin
Application.ProcessMessages;
Sleep(x);
end
Else
MsgWaitForMultipleObjects(0,msgHandles,False,X,QS_SENDMESSAGE);
End;
Application.ProcessMessages is the solution.
Hello Mice,
Application.ProcessMessages;
Sleep(x);
Bad idea :(
Pumping messages will have your event re-entered and thus produce
unpredicable results. If you wants to do that then you have to write a
mechanism to prevent it.
It is mutch better to use the MsgWait function, as I
You can have a look at and try to modify/improve my throttling code:
http://www.xantorrent.pwp.blueyonder.co.uk/ics/uThrottledWSocket.pas
Dan
- Original Message -
From: Mice Cage [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Sunday, April 10, 2005 12:02 PM
Subject:
Hehe, unfortunately, its a little more difficult than that...you'll need to
derive your own TFTPClient and make it use TThrottledWSocket internally
instead of TWSocket.
Make sure this is for the data connection too, the control connection
shouldn't need throttling.
Dan
- Original Message
Thanks Wilfried and Arno.
I did have NOFORMS defined in the project settings.
That's how I got 111KB in the original project. Then I
just modified it.
I tried excluding the uses units one by one and it seems
that I'm having the minimum. What I have (in all units) are:
Windows, SysUtils,