tags:

views:

41

answers:

1

I want to make a change to a VB6 app which consists of a .EXE, no VB6 DLLs but a handful of .NET DLLs.

The interop is achieved by a one of the .NET dlls being referenced by the VB6 app which seems to require REGASM-ing of an associated .tlb file.

If I want to change only the VB6 app .exe, could I just compile it and drop it into the app folder on existing installations or are there going to be binding issues?

A: 

When you regasm using this approach be sure to Use /codebase so that the application can live in the same folder as the DLL(s).

As a side note you may wish to actually specify the DispID of your methods on your Dll's so that if you change your Dll you won't need to change your application (which only really is a problem if you cause Alphabetic reordering of method names) by adding a new Method.

Paul Farry
Does DispID allow you to recompile the DLL but not have to change the .tlb file? How does it work?
Craig Johnston
That's correct, you'll need to setup an Interface explicitly, but yes you can alter your DLL (internal implementation, not method signatures) without needing to recompile your VB6 application as the TLB will not changed. I have an [Example](http://stackoverflow.com/questions/851501/handling-vb-net-events-in-vb6-code/1010085#1010085) that I answered sometime ago.
Paul Farry