Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Is there a way to upgrade a VB6 ActiveX dll to .Net and keep binary compatability??

Back to Forum: Tech Off
  • User profile image

    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

  • User profile image

    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.

  • User profile image

    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?

  • User profile image

    For this instance, I am trying to have an existing VB 6 dll get migrated to .Net 2005 and have the GUIDs set to the VB 6 dll values so that existing VB 6 client applications do not have to be recompiled.

    Perhaps this will clear up my needs Smiley

    Thanks for any help offered Smiley

    Bob Hanson

  • User profile image

    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.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.