I have reached the max number of classes in a VB6 project, any solution?

Viewed 104

I have a huge legacy VB6 DLL project that have many classes. When I want to add 1 more class to the project, an error message "Out of memory" was shown. I have tried to create another DLL project and move some classes to the new one but failed because of another "circular reference problem" occur. My classes are reference to each others. I know I can use late binding to solve the "circular reference" problem but I don't want to do that because there are too many code have to be changed and all code intelligence are gone. Please help. Thanks

Added a diagram to show my current situation (black), and my expected solution (blue) but don't know how. The red one is technically ok but not good because same category classes putting in different dll projects

[Update] Just added a diagram to show my current situation (black), and my expected solution (blue) but don't know how. The red one is technically ok but not good because same category classes putting in different dll projects

1 Answers

As a first step, I would look for dead code that could just be removed. This might be the quickest way to clear the immediate problem by freeing up space for new classes/identifiers. This would buy you time to more carefully refactor into independent projects.

MZTools is a (non-free) VB6 IDE plugin which has (IIRC) some tools to do basic code inspections and find modules, procedures, etc. which are not referenced. So that right there might get you what you need, if its not already obvious which things you could just delete from the project.


BTW if you aren't using source control I think that would be essential for this kind of work. You want to first commit the current state, and then you know you have that as a safe reference point to base further changes upon.

Related