J
jjrwork
Hello,
This is the first time I post a message so first of all my apologize about
my poor language.
I have a problem:
I have a Windows Forms (STA) app in which I have to use an ActiveX for a
third partner which takes several seconds to perform their operations. If I
run this methods directly my User Interface becomes "frozen", so I run this
ActiveX/COM in a new thread following this example:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/AsyncUI.asp
it works OK if in the thread function I create the COM object, use it, and
destroy. But if I create the COM object in my UI Thread and pass the object
to the new thread to use it, the application UI becomes frozen.
I need to maintain the reference of the COM object to use it along the
application lifetime (the initialization is very slow), so I need a
solution.
I have search on the Internet and I found someone who have the exactly the
same problem, but I don't understand the solution.
http://www.thescripts.com/forum/thread256039.html
Can you give me an example or a piece of advice? I'm absolutely desperate...
Thanks in advance.
Jorge
This is the first time I post a message so first of all my apologize about
my poor language.
I have a problem:
I have a Windows Forms (STA) app in which I have to use an ActiveX for a
third partner which takes several seconds to perform their operations. If I
run this methods directly my User Interface becomes "frozen", so I run this
ActiveX/COM in a new thread following this example:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/AsyncUI.asp
it works OK if in the thread function I create the COM object, use it, and
destroy. But if I create the COM object in my UI Thread and pass the object
to the new thread to use it, the application UI becomes frozen.
I need to maintain the reference of the COM object to use it along the
application lifetime (the initialization is very slow), so I need a
solution.
I have search on the Internet and I found someone who have the exactly the
same problem, but I don't understand the solution.
http://www.thescripts.com/forum/thread256039.html
Can you give me an example or a piece of advice? I'm absolutely desperate...
Thanks in advance.
Jorge