View Full Version : HELP! Registering dependencies - DLL hell

08-31-2004, 10:53 AM
I'm confused.

It's probably best to illustrate my dilemma with an example:

Let's say I've written an Active X control, called "X" version 1.0.0 which is used in an application, "A". I install the application on another machine, copy the OCX file for the control in the app folder and register it. Everything is fine and there is world peace.

Now I write a second application, "B", that also uses the Active X control, "X", but this time I've found a small bug in the activeX control. I fix the bug and recompile "X". I now want to distribute my application "B" on the same target computer that has application "A" on it.

The problem is that when I install app "B" and register the control, application "A" no longer runs because the version of "X" has changed. Now the sky is falling.

How it is possible to have application "A" still run and reference the old version of the control, while allowing "B" to run with the newer version? In both cases, the installation packages for app's "A" and "B" are registering the activeX control "X" via extraction of COM information.

I'd appreciate any and all help. I've been banging my head against the keyboard on this one.


Mike Marino
09-09-2004, 06:46 PM
Why is the version of the DLL changing an issue? It should not matter. For example, Express itself uses many shared DLLs (just look in C:\Program Files\Common Files\InstallShield).

When a New Version of Express comes out we can issue a new versions of the shared DLLs that are backward compatiable with older versions of Express.

As long as you follow COM rules (Do not change Intefaces, etc.) You should be OK.

09-10-2004, 11:58 AM
Thank you.

Is the same true for ActiveX controls created in VB6 (.ocx files)? I used dll's in my example (not sure why now!) but in reality the issue for me is occurring with a couple of custom .ocx controls.


Mike Marino
09-10-2004, 12:53 PM
Usually an OCX is the same thing as a Self Registering DLL. In VB you have to be careful.

In your Visual Basic OCX project, open the Project Properties and and go to the Component Tab. When Re-compiling your project, you will want to reference the older version of your OCX in the Version Compatibility area.

The VB Help can give you more direction on whether to use Project or Binary compatibility. But do not use "No Compatibility". That would cause problems with older apps that used your older OCX to not work with the newer OCX.

Hope this helps.

09-10-2004, 01:16 PM
Great advice. Thank you very much.