Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. STA Activex Controls and AppDomains?

STA Activex Controls and AppDomains?

Scheduled Pinned Locked Moved C#
comjsoncsharpasp-netperformance
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dr Herbie
    wrote on last edited by
    #1

    Hi folks, I currently have to interop to an old ActiveX control that requires the STA threading model. In order to get the control to work, I have to use STAThreadAttribute on the Main method of my desktop application, and set my ASP.NET application to be ASP compatible. This has impact on the threading of the rest of the application which is undesirable (especially on the ASP.NET application). Is there any way to load the ActiveX into a separate STA threaded AppDomain, and keep the main AppDomain MTA? I haven't been able to find any examples or explanations for this. We need to have considerable interaction with the ActiveX control throughout the rest of our code, and I don't know the impact of cross-AppDomain calls on performance, but I can't test until I find out how to separate the AppDomains. Any interop/threading guru's out there? PS. We can't rewrite the Activex control as it is third party (and has been discontinued). It contains complex mathematical parsing that we need to maintain for backward compatability. Dr Herbie Remember, half the people out there have below average IQs.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups