ActiveX Control In a Thread

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top