By refering to Another Question About ActiveX freezes IE , I wrote an Active like the author did too, when the activex does something, the whole IE is freeze. No other tab can be selected nor the tab has the activex in it can be closed.
I know that I can write some threading code to do the work. However, my question is, Other activex like Flash or Silverlight, how do they workaround? I do not believe that they do all the work async-ly, maybe they keep all their work very short so we never noticed the latency?
Any advice is welcomed. thanks.
You cannot perform long running operations on IE’s UI thread, or the tab will hang. The UI thread is the one your control is instantiated on; it is the one that calls
IObjectWithSite::SetSite(). What sort of work are you doing? Long running operations include file processing, HTTP requests, and anything that involves acquiring a lock of any sort.Your conjecture about how Flash does it’s work is also wrong; Flash does indeed use multiple threads.