Forcing ActiveX to load v1.1 when v2.0 is installed

I have an ActiveX control (inproc) that is written in Managed C++.  When Internet Explorer (or any other ActiveX host) loads it, how to I make certain that the 1.1 runtime is loaded instead of the 2.0 runtime if both are installed on my machine

I've tried a MyActiveX.dll.config file requiring the appropriate runtime, but that doesn't seem to do the trick.  Any other ideas



Answer this question

Forcing ActiveX to load v1.1 when v2.0 is installed

  • Neha_roy

    Apparently I wasn't clear enough in my question that anyone could answer...  ;-)

    Is there a way for a Managed ActiveX Control to specify which version of the .NET runtime it should be linked to

    I could make a small shim ActiveX control that then runs a Local Server or just an application and that application can control which version of the .NET runtime it runs under, but I would hope that there is a better solution...


  • Nicholas Allen

    That's what I was afraid of...

    I think it would be bad form to add a .config file to an application that is not my own, so it looks like the shim might be the only way to go....

    Thanks,


  • Ben_userdn

    AFAIK there is no way for the managed ActiveX control to specify this.
    My understanding is that ActiveX controls will be loaded into the default application domain.

    You can specify the framework version using a config file: it needs to be hostname.exe.config in the same directory as your host executable (i.e. iexplore.exe.config to load it into iexplore.exe) - not ActiveXControl.dll.config.

    A bit of a pain as you need a config file for each host your control may reside in...

    And even more of a pain if you want to host two different managed ActiveX controls which need different framework versions.

    If you need more than this, I think you'll need to look at using a shim.

  • Forcing ActiveX to load v1.1 when v2.0 is installed