UI Automation documentation recommends to "make all UI Automation calls from a separate thread" (seehttp://msdn.microsoft.com/en-us/library/ee671692%28v=VS.85%29.aspx)
However it says nothing about whether it should be the only thread or multi-threaded access is also possible and safe.
So, I have 3 questions:
1. Is it OK to access UI Automation API from multiple threads? Can I for example get a IUIAutomationElement in one thread and pass it to another thread for further usage?
2. Is it OK to access UI Automation from STA threads as longs as they do not attempt to add/remove event handlers? MSDN says "Using the Single-threaded Apartment (STA) model can cause problems such as preventing clients from removing event handlers from the thread.". Does this mean other uses of STA threads are OK?
3. If the above usage is safe which cases result in performance penalty?
Thanks.