I think this is a factory / provider type story but I'm not sure how to describe my problem. It goes like this.
InstallShield has a COM Automation Interface that they change the name of it with each release. If it was VBScript I'd say
set project = CreateObject("ISWiAuto15.ISWiProject) ' InstallShield 2009
set project = CreateObject("ISWiAuto16.ISWiProject) ' InstallShield 2010
once I have a project object I can do things like
project.OpenProject( filePath, readOnly )
In C# .NET 3.5 I add my COM reference and do the same things except now I'm tightly coupled to that class. I want to be able to do something like
var project = CreateProjectObject( typeof ISWiAutoXX.ISWiProject )
But I can't figure out how to do this as there doesn't seem to be any shared interface to cast with.
Am I out of luck or is there a way to handle this type of a problem?