
runtime error 339 - ocx not correctly registered
I created an ocx to use in my VB5 applications. I have it set in the
compile options to use licensing as I intend to market it in the
future. It has been working fine for me. However, I just looked at the
code, tidied up some comments, did NOT change any of the code, and
recompiled the ocx.
Now my programs that use this control give me the following error.
Runtime error 339.
Component not correctly registered: file is missing or invalid.
Now I must reload each of my applications, go through all the steps
again to get instances of the ocx back into the project(see below),
and recompile my applications. I was able to unregister and reregister
the ocx using regsvr32 but that didn't help the applications.
Why would simply recompiling the ocx without changing any code break
all the apps that use it? Is there a way to stop this from happening
in the future. It seems to me it would be a common occurence for a
programmer to add functionality to a control as the need arises
without changing existing methods and properties. Rebuilding all other
apps should not be necessary.
Any help on this is greatly appreciated!
Robb
[VB5]
(remove autospam deterent from address before emailing)
Steps to get the ocx back into my project:
Load a project in VB (forms will load without instances of ocx)
I have to go to Components
Reselect the ocx to get it back into the toolbox.
Replace instances of the control on the appropriate forms
Rename the controls to match the code
Recompile the application