05-10-2007 01:37 AM
05-21-2007 08:48 AM
05-25-2007 02:48 AM
05-25-2007 09:45 AM
Hi dietert,
Understanding how ActiveX versioning works sometimes can be a little tricky
sometimes. The first rule of thumb to remember is that you can only have
one version of an ActiveX control registered on your system at one time. Now,
you might have multiple copies of different versions of the controls scattered
throughout your system, but only one can be registered at any given time.
For example, you might have version 7.0.0 and 8.0.0 of the ActiveX controls on
your machine. One of these controls will be registered and thus any IDE that
supports ActiveX containers will use the control that's registered. So if 8.0.0
is registered, then when you drop an ActiveX control down for example in CVI,
it will say 8.0.0 in the About box. Then if you unregister that 8.0.0 version
and register the 7.0, all programs will now use that version.
I ran a quick test for this on my machine where I had version 7.0.0 and 8.1.1
of the cw3dgrph.ocx control. Version 8.1.1 (in the system32 directory) was
registered and thus my CVI app was using this version. I verified this by
looking into the About box and viewing what control was loaded at runtime
(there's a number of tools out there to do this; I like Process Explorer which
shows me the guts of a process and all the loaded DLLs). The process loaded
version 8.1.1 which is what I expected.
I then unregistered my 8.1.1 control and registered my 7.0.0 control that was
on my desktop. When I opened my app that previously had the 8.1.1 control, it
warned me and told me that it couldn't load the control and a newer version was
needed and that the default settings were going to be used. This is expected.
Essentially, some properties were added in 8.1.1 and
the 7.0.0 controls do not have any way to interpret these properties, so they
revert all properties to the default values.
Notice now if you drop down and ActiveX control, it’s the
7.0.0 version cause it’s registered on the system.
Now, Microsoft did come out with the ability in the last few years to have
side-by-side COM component versioning, but our controls don't support that
since we've been around for longer than that new technology came out.
Now in your case, the recommended approach to development is to bring over the
7 version of the ActiveX control, unregister version 8 and then register
version 7. Now when you are developing in CVI, you will be working with version
7. Thus when you deploy, you are guaranteed that you didn’t' use any new
features or have issues with licensing.
Hope this clears things up! If you have any additional questions, let me know.
Best Regards,