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
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.
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.
There has to be an automatic way... Anyone?
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
Thanks for any help offered
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.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.