Hi,
I am normally not a VB developer but I am in process of updating an OCX for my company.
I must have messed something up because suddenly VB will not load the OCX. Believing that I had done something wrong I uninstalled it again and tried to reinstall the old versions of the OCX - which I know work. But when I try VB says
" could not be loaded
The OCX uses a DLL but I made sure to have the correct old version of the DLL present and the corresponding LIC file. All the files are copied in c:\windows\system
What is going on and how do I clean up so the old OCX can be used again?
I use VB 6 (SP 4)
It sounds like you changed the OCX's interface? Every OCX has a GUID (global identifier) that is used to uniquely identify it as an object.
When you reference an OCX in a VB project, it stores the OCX name and GUID in the VB project's VBP file. If that GUID has changed, the VB project maynot be able to find the old object.
Another issue I have seens is the version number. When you recompile an OCX, it's version number gets incremented. The VB project using your OCX has the version number stored in the VBP as well. If it cannot find that particular version, then it will fail.
This typically happens when you are developing on two different PCs, where you have incremented the version number locally, but not in a build environment.
In VB there is a setting called project compatibility. This controls how an OCX GUID is managed. You have No Compatibility, Project Compatibility and Binary Compatibility. Each one operates differently on how the GUIDs are maintained. (You can check out more on these in Help).
Do you know if you changed these settings? When you compiled your project, were you warned that you have made interface changes?
Did you change any public interfaces to the OCX? Either renaming an existing function or adding/deleting function parameters? or function return types?
Generally when you change an OCX, the goal is to maintain its compatibility with existing clients, so that the users of your OCX do not have to recompile.
I think more information is need from you to determine exactly what you did and what a solution may be.