none
VB6 Interop .Net without COM? RRS feed

  • Question

  • Hi,

    I'm working on the interop between VB6 and .Net. Basically I would like to display a WPF form inside a VB6 application.
    I considered using .Net COM interop, but there was a little problem that the COM needs to be registered, which was not acceptable for some reason.
    Then I found it's possible to have reg-free COM through SxS, but it requires WinXP SP2, which makes me nervous as it's not a guaranteed environment.
    Is there another way of achieving this interop? Thanks!

    Daniel
    Tuesday, January 20, 2009 9:51 AM

All replies

  • I don't believe reg-free COM is supported for .NET ComVisible assemblies.  Regasm.exe adds extra keys to the registry beyond the normal ones that you can replace by a manifest.  If registration is verboten, you'll have to stop using VB6.  It cannot run without its own runtime components getting registered.
    Hans Passant.
    Tuesday, January 20, 2009 12:23 PM
    Moderator
  • It seems that the reg-free COM works for .Net assembly as I've got a very simple prototype working. Do you mean there is some kind of limitation there? The concern I have over this is that Windows XP SP2 is required. Thanks.


    Daniel
    Wednesday, January 21, 2009 1:23 AM
  • On earlier operating system just register the COM component as usual.
    Hans Passant.
    Wednesday, January 21, 2009 1:29 AM
    Moderator
  •  The requirement I got is never register anything for this to work, and SP2 is not guaranteed. So I'm probably looking for another work around instead of the COM approach. Is it possible to achieve such through C++? Thanks.
    Daniel
    Wednesday, January 21, 2009 1:32 AM
  • No .
    Hans Passant.
    Wednesday, January 21, 2009 2:30 AM
    Moderator
  • Given XP SP2 was released back in '04 I don't think it too much to ask as minimum requirement for your application.
    Wednesday, January 21, 2009 3:51 AM
  •  Can you modify the VB app code?

    Mattias, C# MVP
    Wednesday, January 21, 2009 1:11 PM
    Moderator
  •  Yes I can, does that lead to a solution? Thanks.
    Daniel
    Thursday, January 22, 2009 1:12 AM