ActiveX Control In a Thread

G

Guest

I tried to use an ActiveX control functions and Events in a thread. I just
added a reference other than add the control to Toolbar. I don't put the
control into any UI. I got error: System.Runtime.InteropServices.COMException
(0x8000FFFF): Catastrophic failure

My question:
1) How to use ActiveX control functions and event without UI?
2) Can I use ActiveX control functions and event in a thread (Not Main
Thread)?

Thanks
 
N

Nicholas Paldino [.NET/C# MVP]

Mike,

You aren't going to be able to do this, as ActiveX controls require
specific interaction with their host, which you are not providing.

You might see how far you can get by setting the ApartmentState of the
new thread to STA (ActiveX controls require this, and new threads by default
are MTA apartments). However, I don't think you will get much further than
that.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top