views:

120

answers:

2

I need to have my Delphi program use a new version of a third party DLL. I'd like to be able to use the new version but revert to the old version if I need to.

Some of the objects are invisible objects on a form in the app. Others I instantiate at runtime.

How do I install the new version of the DLL into Delphi while maintaining the existing version? I'm using Delphi 2007.

+2  A: 

We have several products. Some of them are developed with different versions of Delphi and different versions of external components. (Sometimes porting/upgrading is not an option).

To solve this problem we have (network)shares for each product. And if we start working on a product, we map the standard drive (in our case w:) to that share and start the required version of Delphi. That way each product has its own environment and its own version of the components.

Downside is that you have to kill some popups sometimes, at startup, but the system works fine.

Another solution is to use virtual pc's. But not al licensing systems allow that use.

Gamecat
+1  A: 

At runtime (including deployment), you should be able to use Win32 assembly side-by-side sharing (WinSxS) to make the new version of the component available to your application, while letting the rest of the system continue to work with any existing version. Disclaimer: I've never done this in practice.

However, at design time (in Delphi), I think you have no other choice than to work with a specific version at the time, unless they generated new interfaces and coclasses (in which case you can generate different names in the Delphi wrapper) for everything that was changed. Solutions such as those offered by Gamecat would probably be your best bet.

Paul-Jan