1

I have a relatively complex set of VB6 forms and classes that need conversion to VB.NET. The classes are complex across COM boundaries, supplying interfaces and events, and sinking events from other COM classes.

None of the classes marshal variant or other complex data types across COM boundaries, so I don't need to try and do anything really difficult with the interfaces.

Are there any tools available, free or commercial, which can automate that, given a copy of VS2010 and a wallet full of money for utilities, but not consulting services?

Rob Perkins
  • 3,088
  • 1
  • 30
  • 51
  • I really don't know if it is suitable, I use ReSharper for C# and I am able to extract interface (and many, many other tasks). There is a version for VB.NET, I hope it helps. http://www.jetbrains.com/resharper – gustavodidomenico Jan 31 '13 at 18:44
  • Not really; ReSharper extracts VB.NET interfaces, not VB6, far as I know. – Rob Perkins Jan 31 '13 at 19:01

4 Answers4

1

Please see a question I asked once similar to this here: VB6 code upgrade. Look at the answer from Olivier Jacot-Descombes who talks about the tool available in Visual Studio.

I would suggest rewriting the code as in my experience it is time well spent.

Community
  • 1
  • 1
w0051977
  • 15,099
  • 32
  • 152
  • 329
1

I had a similar task to do and for me the simplest way was to upgrade the VB6 code to .Net using the wizard in Visual Studio 2005. Then upgrade the project to Visual Studio 2010 and then use a refactoring tool to extract the interfaces.

No need for expensive third party tools although you'll still have to manually check all the interfaces to make sure nothing has been missed out.

Carl Onager
  • 4,112
  • 2
  • 38
  • 66
0

You obviously need to parse the VB6 code, and extract name and type definitions. There aren't a lot of robust VB6 parsers around.

We have one of them, built on top of our reengineering tool foundation, DMS. You can get these as products, and configure them for your purposes. The VB6 front end provides parsing to full ASTs with all details; DMS provides additional machinery useful for building symbol tables, doing type analysis, and support data flow analysis, which is likely what you'll need if you want to know which interfaces use which. This isn't any easy task, as these pieces of machinery are fairly complex (due that the fact that real programming languages such as VB6 are complex); most people are more interested in services to just make a migration happen but situations vary. See VB6 migration tools. (I'm the CTO behind DMS).

You can always write a Perl script to try and extract this information. This will likely get it right 70% of the time; your energy will be spent in trying to figure which 70% is correct, how to patch the other 30%. If your system is pretty small, this might be easier.

Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
0

Spend the money on VB Migration Partner or Artinsoft VB Upgrade Companion and let the tool convert the code as well as extracting the interfaces.

MarkJ
  • 30,070
  • 5
  • 68
  • 111
  • Does the artinsoft tool permit me to extract only the frm, cls, and mod files I need, leaving the remainder in place? – Rob Perkins Feb 02 '13 at 02:01