0

I have greatly edited a VB6 dll and when I try to compile it, I get a notification that informs me that this dll is no longer compatible with the older version? I am unsure how to proceed, originally when I made minor changes I had no problem compiling the new dll. I have tried following this guide to solve my problem: Resetting project compatibility in vb6 However when I reference the dll in my main application and try to compile it I get the following error: "Error in loading dll"

I am really confused as to what I have to do in order for my application to realize that the dll is in fact referenced and that I have made changes to it.

Here is what appears:

enter image description here

Help would be much appreciated! Thanks

Geert Bellekens
  • 12,788
  • 2
  • 23
  • 50
ChewyMasta
  • 73
  • 2
  • 9

1 Answers1

2

You need to read How To Use Project and Binary Compatibility and other related MS KB articles, as well as the parts of the VB6 manuals covering this subject.

Do this before you go further to avoid creating a pile of orphaned entries in the registry.

Once you have binary compatibility under control things get easier. However at this point you are sort of stuck, and will have to go into your client Project and remove the original reference and then add a new one.

Bob77
  • 13,167
  • 1
  • 29
  • 37
  • Thank you for the link. I still don't quite understand how I can update my dll ? if it is not longer compatible shouldn't i preserve compatibility since many other dlls also make use of this dll ? – ChewyMasta Apr 27 '15 at 14:44
  • The only way you can maintain binary compatibility... is to do so. This means for example that you cannot change class member signatures (all properties, methods, and events must have the same arguments and return values). You *can* add new members, and the result is a new-versioned but binary compatible interface... usually. Even this can fail at times though. See the VB6 documentation. – Bob77 Apr 28 '15 at 12:24
  • See https://msdn.microsoft.com/en-us/library/aa241689(v=vs.60).aspx and https://msdn.microsoft.com/en-us/library/aa260637(v=vs.60).aspx and many other articles included on the MSDN Library CDs that come with all legal copies of VB6. – Bob77 Apr 28 '15 at 12:27