Reset project compatibility in vb6

When we break compatibility in vb6 dll, I have to do the following:

  • Set binary compatibility
  • Recompiled
  • Set Compatibility Again
  • Remove the link to the modified dll from all projects that use it
  • Add a link to all projects that use it
  • Recompile all these projects
  • Do the same for any projects that use these projects, etc.

Of course, this is a little simplified, but everyone who has done this before should know what I'm talking about.

My question is: did you find the best way to do this, or did you find any (not too expensive) tools to facilitate this process? Or even better, you created one that you can share with me :)

Please note that I am asking how to make this process easier and not how to avoid it. Therefore, please do not give answers about how bad it means to break compatibility and that we should not do this. I live in the real world, where there are things beyond my control, and I'm just trying to figure out what I have.

+8
dll vb6 com activex
source share
5 answers

In my previous work, I had a huge VB6 application that contained dozens of VB6 DLLs that we referenced projects in our project group. We often violated compatibility, and manually updating links as you described was not an option.

We initially developed a tool that will update links in all .vbp files in a folder after hacking and recompiling, but in the end I found Visual Build from Kinook Software (www.kinook.com) that could solve this problem automatically.

I have used my solution for many years with success. What's good about their “Make VB6” action (http://www.kinook.com/VisBuildPro/Manual/makevb6.htm) is that it can build the dependency tree and rebuild all your projects in your project group in the correct order while updating the links accordingly.

For your scenario, you need to set the option "Set version compatibility before building" to "No compatibility", and then select the "Set binary compatibility" check box so that projects return back to binary compatibility after assembly.

If you have projects for which you need to maintain binary compatibility, just leave them outside .vbg and it will not restore it.

+8
source share

Additional examples Visual Basic 5.0 and 6.0 offer an optional add-on for binary compatibility. See the ReadMe.txt and Revised Binary Compatibility.doc files after the “installation” (you must complete the steps after downloading).

This download includes the Revised Binary Compatibility document as well as the Add-in SyncCompt.dll. Binary compatibility implemented in Visual Basic 5.0 and Visual Basic 6.0 ensures that new versions of delivery products are fully compatible with older versions. The document explains the problems associated with binary compatibility and the GUID version, and introduces a DLL. The DLL add-in creates a new compatibility file to stabilize your product (except for Standard EXE, which does not have binary compatibility). This tool only works in Microsoft Windows NT® environments.

This may or may not solve your problem.

+3
source share

You do not need to change the compatibility setting. However, you need to make sure that the dll (or exe) you refer to in the compatibility settings is not the place you are going to compile to.

We do something similar, so we have the following structure:

C:\ProductName\Bin - contains all live assemblies

C:\ProductName\Bin\Compatibility - contains all assemblies, as they were in the last assembly

After we create the assembly (which we do automatically by tracing VB6.exe), we move everything to \Bin to \Bin\Compatibility

+1
source share

I found the version compatibility in ActiveX components on MSDN with a high degree of enlightenment for compatibility and when / how to break it. I am posting this mainly for future reference.

0
source share

I solve the problem without saving compatibility information.

I delete the line CompatibleEXE32 = {dllname} from the .vbp files

I never save .vbp files after build, so the link is not returned.

0
source share

All Articles