tags:

views:

30

answers:

2

I have a widely used but old VB6 COM DLL that needs additional functionality. I would like to get rid of the old DLL but it's used by at least 27 applications that I don't want to recompile.

Is there a way to use the "old VB6 COM DLL" (and all of it's COMie -ness) as a shell or interface with .NET code behind it actually doing the all the processing.

The goal is to have the 27 applications thinking that the old DLL is still there processing?

If this idea can be implemented then, I'll only need to deploy the new DLL and the 27 applications will live happily ever after.

Is something like this possible?

A: 

Why use the old DLL at all? Replace it with an equivalent .NET COM object.

If necessary, your replacement object can create an instance of the old COM object and delegate some of the behavior to that old object.

John Saunders
I don't understand how to implement such a solution. Would you recommend references or examples.
http://msdn.microsoft.com/en-us/library/ms686558(VS.85).aspx
Sheng Jiang 蒋晟
A: 

You could to write your .net application as a serviced component. This will make your new .net code COM+ visible allowing you to add a reference to this new component through your old COM+ code.

Using same technique, you could (theoretically) to create a .net component which have same characteristics than your VB6/COM, including same CLSID. As I don't have a vast experience in this subject, I just want to tell it's possibilities.

Rubens Farias