views:

86

answers:

2

We have a large, deployed, 3-tier .NET application which for good business reasons can't be upgraded at present. The client makes use of a number of classic c++ ActiveX controls through the usual interop mechanism.

We have fixed some critical bugs in one of the ActiveX controls and need to deploy the fixes to a number of customers without reinstalling the client. Patches are allowed, including upgrading dlls. Is there a way to install a bug-fixed ActiveX dll without requiring a new client? The interface, filename, GUIDs, etc., are all unchanged.

I've tried just replacing the dll without success -- got a variety of somewhat strange errors, but it's possible that the ActiveX dll (which is still in development) is defective -- that's being followed up in parallel.

Should simply substituting the dlls work? If not, can you suggest another approach short of rebuilding then reinstalling the client which ought to work?

A: 

If the interface hasn't changed then overwriting the original dll will work.

Patrick
FWIW, I was unable to make this work this way. Extensive work with Microsoft MSDN Support finally got it working by also replacing the two generated interops. I still don't understand why. And I'd be interested in finding a reference explsaining exactly how the C++->interop->COM interface works.
mlo
A: 

how about unregistering before replacing it, and then re-registering.

regsvr32.exe /u [YOUR DLL HERE]

then overwrite the dll, then

regsvr32.exe [YOUR DLL HERE]
Rory
mlo
Yeah, I also think that's right, but it will do no harm and I could swear I've hit cases where it seemed like it should be unnecessary but did the trick.
Rory