page 1 of 1
Comments: 4 | Views: 3424

Hello All,

I wanted to check if there is a way to take a VB6 ActiveX dll used in about 20 projects and update it to a .Net 2.0 dll that is COM aware and not have to recompile the 20 existing projects.

Any thoughts or insights are greatly appreciated Smiley

Bob Hanson

Minh
Minh
WOOH! WOOH!
So you want to

(VB6 COM DLL) --> (.Net assembly) --> (COM) --> (used by VB6 projects)

?

Because you want to create new .Net projects leveraging your VB6 DLL, right?

If so, I believe that when you reference a COM DLL in your .net project, VS will create a proxy class for you, so there's no need to convert your VB6 DLL manually.
Massif
Massif
aim stupidly high, expect to fail often.
Or, if you're looking to take advantage of .NET in an updated version then you'll have to do a little more leg-work.

You should be able to create a binary compatable version by using attributes to specify the GUIDs for all the interfaces in the .NET assembly - but unless there's an automatic way of doing this you're going to have to discover and set all your GUIDs by hand. Ouch...

There has to be an automatic way... Anyone?
Tensor
Tensor
Im in yr house upgrading yr family

Well, you can tag all your members with a <system.runtime.interopservices.guid("existing guid value here")> attribute... You are going to need to get all the existing guids and stick them in, which may be tedious if it is a big component - and even then I'm not sure it will work. Perhaps do a test? Good luck.

page 1 of 1
Comments: 4 | Views: 3424
Microsoft Communities