Francois, > 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
Not quite: I wrote "Are there any handles left after freeing the client?" > So both constructor and destructor have to be called > directly or indirectly from TThread.Execute. I know this and everything is created and destroyed in the thread's execute. The thread has a message loop for async communication, and when a desktopchange is detected, then the HttpCli is destroyed, an attempt to switch to the new desktop is made and de HttpCli is recreated within this message loop. So everything happens within the threads execute method. I can see in the tool you pointed me to (Bear) that when I create and destroy the thread, all handles of the thread are destroyed. Unless it's the message loop that's blocking the switch, I can find no reason at all why this thread won't switch and the other threads do. Paul -- 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