-1

My app is a c# plug in to a 3rd party unmanaged app. I have a windows form with one of their controls (an AxInterop) that depends on one of their unmanaged dlls. Their 2015 version of the same control depends on a different type library file (eg. abc.tlb is now 123.tlb), but they both support the same interface.

I don't want to create separate builds.

How can I get my code to use the ABC.tlb for the earlier versions and use 123.tlb for the 2015 version?

Can you load tlb files like assemblies at start up?

thanks

Perry
  • 1
  • 3
  • 1
    That makes no sense. The .tlb file is the type library that's used at compile-time. You must therefore recompile your app with a new type library reference. – Hans Passant May 23 '16 at 09:01
  • I've used dynamics before and reflection so I don't have to reference the same dll used by this control. The difference here now is that I'm using the control which is referencing the dll and I am looking for a way to get it to find the new dll for 2015. So maybe thinking I need to load a different tlb I just need to load that new dll at start up. Does that make sense? – Perry May 23 '16 at 15:24

1 Answers1

0

ok, solved it using dynamics after all. The AxInterop control was a red herring. The control has a property that is of the type that changed for 2015. I used dynamics to get the property from the third party's workspace object and then set the property to that value. My project has no references to ABC or 123.

Perry
  • 1
  • 3