Arno Garrels wrote:
> Fastream Technologies wrote:
>
>   
>> Upgrading might be simpler than you think. Just rename ICSv5 folder,
>> unzip and install v6 package and then rename all ICS unit names so
>> that they start with "OverbyteIcs...".
>>     
>
> Indeed it is easy, however if you have derived classes with overidden
> WndProc-methods and custom messages it's a little bit more complicated
> than just to rename unit names in the uses clause. Please read the 
> comments in OverbyteIcsWndControl.pas.

Thanks for the information. I did moved to v6 and had to adapt a few 
things (would have been nice if Disposed in TIcsWndControl had been 
protected and not private) but it did not help at first.
Why?
Because as soon as all connected clients would disconnect, the handle 
allocated for them would be released. And the next time a client comes 
in, the handle cannot be created anymore because the Indy part of the 
process has taken it.
What I did was to instantiate a dummy TIcsWndControl component per 
message pump thread instance, attach it to the thread and only release 
it when the thread ends.
Then I made the threads start at the beginning of the process instead of 
"on demand". There are only two of those threads, so that's not too much 
of a hassle.
This way the handle is created at the very start, when there are still 
handles left for the process and is never released even if all clients 
disconnect.

Note that I created a dummy "TIcsWndControl" instance as it seems the 
easiest way to do keep the handle opened, if you know of a better way, 
please let me know.

Regards
Olivier

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

Reply via email to