>>> Everything is created in the threads execute, so that should be fine.
>>
>> You have to destroy also at the end of the execute method or from a
>> function
>> called from there.
>
> Sure, but that is not the problem.
> When a desktop change is detected, these steps are executed:
> - destroy HttpCli
> - destroy a Timer (uses a handle also)
> - switch to inout desktop
> - receate HttpCli and timer
>
> The problem is that it won't change the desktop, other threads I use do.
> So there must be something that's blocking it

Paul, you told me in your intial message that having a handle still 
allocated prevent desktop switching. As I know you are using threads, I just 
wanted to remind you that to destroy a window handle, you must call 
DestroyWindow from the same thread context as the one which was active at 
the time of CreateWindow. Translated to components, it mean you must call 
THttpCli (and others) destructor from the same thread as the one which 
created the instance. So both constructor and destructor have to be called 
directly or indirectly from TThread.Execute.

Note that speaking ICS, it is enough to call ThreadDetach and ThreadAttach 
to destroy and recreate the hidden window. No need to fully destroy the 
component.

Also be aware that ICS-V6 share the same window handle for a bunch of 
components.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
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

Reply via email to