0

I have a .NET WinForms application that I've converted into a COM dll using the Interop Forms Toolkit 2.1. Thet setup project for the application has both my tlb as well as the Microsoft.InteropFormTools.tlb file set to Register as vsdrpCOM. The prerequisites for the project are to ensure that Windows Installer 3.1, .NET Framework 3.5 SP1, and the Microsoft Interop Forms Redistributable Package 2.0a is installed.

When I run this locally on a Windows XP box with both Visual Studio 2010 and Visual Studio 6 installed, it works fine. However, on this Windows XP machine, I receive an error stating: "Class does not support Automation or does not support expected interface."

Any ideas?

Jason N. Gaylord
  • 6,820
  • 13
  • 52
  • 92

2 Answers2

2

I got it. For those of you that are running into the same, do the following:

  1. Go into Visual Studio 2005, 2008, or 2010 (I used 2010) and build your Interop Form.
  2. Then, go into Visual Basic 6. If your library is not already referrenced, reference the library.
  3. Build your VB6 executable.
  4. Go back into Visual Studio (.NET version) and build only your installer. This way the installer and VB6 both have the same .tlb file

You're good to go. Thanks for the suggestion Kris!

Jason N. Gaylord
  • 6,820
  • 13
  • 52
  • 92
0

You have RegAsm the assembly (see stackoverflow for more) on the machine you want to install the application on. The assembly should also be in the directory where the VB6 application runs, or installed in the GAC.

Community
  • 1
  • 1
Kris Erickson
  • 32,405
  • 26
  • 113
  • 170
  • I thought the Installer would take care of it for me as long as the Microsoft.InteropFormTools.tlb was registered as vsdrfCOM and the output was registered as vsdrpCOM. This is detailed in a white paper here - http://download.microsoft.com/documents/uk/msdn/vb6/Interop_Toolkit_Whitepaper.pdf – Jason N. Gaylord Jun 21 '10 at 16:05
  • Reading over your question again I see you where creating the setup project in Visual Studio, this will work, but if you are using another installer, or installing by hand, RegAsm is required. – Kris Erickson Jun 22 '10 at 01:37