VB6 IDE blocks a loaded project DLL

I am responsible for maintaining outdated VB6 code and ran into an annoying problem regarding locking the project's COM library. (We will call it MyProject and MyProject.dll )

When I load MyProject into the VB6 IDE, I can compile the resulting binary compatible MyProject.dll DLL. Then I can run my (classic ASP) web application that connects to the DLL (or something else in this case).

So, when I try to recompile the COM-DLL, I get a failure resolution error. Then I need to follow these steps to unlock the DLL:

  • Make sure I don’t have any dependent projects open in other VB6 IDEs
  • Recycling IIS
  • Check that the file is not read-only (sometimes it will be if I checked it in the original control)
  • Close the project and open it.

Often this is the last step that fixes the problem and allows me to recompile, which means that the VB6 IDE actually blocks the DLL of the loaded project!

My colleague explained to me that this is due to how the VB6 project works with binary compatibility with DLLs, but could not offer permission.

My searches elsewhere yielded little to answers. Search queries related to this usually return a lot of unrelated answers (maybe I ask the wrong queries in search engines).

The closest thing I could find on Stackoverflow was this question a couple of years ago, but this is not very suitable for the account.

Does anyone have any other suggestions that could improve this?

+4
source share
1 answer

Save a copy of MyProject.dll with the name MyProject.cmp and specify the binary compatible parameter in your .cmp file. Thus, you do not need to re-open the project file (step 4).

During registration, you can mark “save” to skip step 3.

+3
source

All Articles