I have 3 .vbp projects that are part of a group.
I am able to make dll of 3 and 2 and when I wanted to make the dll of 1.
I am setting the project reference of 1 to the correct dll of project 2.
However, when I save the changes and re open the vbg file. The reference that I have changed is not shown and it reverts back to someother version of the dll.
I havent worked in COM and I am unable to move forward. Any input or support is highly appreciated.Answer1:
When you reference ActiveX or COM DLL's and EXE's, you have little to no control over which DLL or EXE file actually gets used because VB6 is working strictly from the GUIDs and the Windows Registry. The key to working with VB6 and ActiveX and also keeping your sanity is to understand Binary Compatibility. (See <a href="https://web.archive.org/web/20120104232434/http://www.vbsight.com/BinaryComp.htm" rel="nofollow">http://www.vbsight.com/BinaryComp.htm</a> ).
Here's my advice regarding ActiveX/COM projects (whether EXE, DLL, or OCX):
(1) Learn about the Binary Compatibility settings.
(2) It is good practice to suffix your reference executable with a .cmp, such as Project1.dll.cmp. When you look up Binary Compatibility, you'll know what I mean.
(3) Develop your VB6 ActiveX projects inside of VirtualPC; VB6 ActiveX development puts a lot of wear and tear on the Windows Registry.
(4) The file path to the DLL/EXE/OCX in the Reference= setting will change when VB has reason to locate an ActiveX object; it will go with whatever it finds in the registry (the latest to register wins). Also, there is the "Upgrade ActiveX Controls" setting the Project properties that can make changes.
(5) You have little to no control over the GUID or Type Library that VB6 will generate, except to the degree you can achieve via proper Binary Compatibility management.Answer2:
If you use the Binary Compatibility option for the DLLs/OCXs you compile in VB6, the references in the existing VB6 projects become broken after you recompile your stuff. We dealt with this 'issue' a lot so we implemented our <a href="http://10tec.com/vb6-project-references-update/" rel="nofollow">VB6 Project References Update Utility</a> to replace the references to ActiveX's in exisitng .vbp projects automatically. The utility is free and open-source, and most likely, it will save much time for others in similar situations.