View Full Version : Registering ActiveX
NewsArchive
12-16-2011, 01:37 AM
Hello Fredrich,
A question please :
In my installer I register some Noyantis ActiveX
Do I need to perform a check on "is registered" before doing so or can
I simply register each time there is an update or install ?
Merci
JP
--
JP
__________________________________________________ _____
For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____
DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com
NewsArchive
12-16-2011, 01:37 AM
Hi JP,
> A question please :
>
> In my installer I register some Noyantis ActiveX
> Do I need to perform a check on "is registered" before doing so or can I
> simply register each time there is an update or install ?
Not sure if you can simply "check" if the Noyanties ActiveX is already
registered. In most cases, the code in an ActiveX handles all this
automatically.
Registering an OCX is nothing more than calling into the registration
function of the component. The component itself does all the
un-/registration stuff.
So IMO, it's not required to check whether the OCX is already registered or
not.
Friedrich
NewsArchive
12-16-2011, 01:38 AM
Merci Monsieur Fredrich <g>
I had a report about CCleaner finding 20 "dead" links to this ActiveX
Will check on my side what this could be
--
JP
__________________________________________________ _____
For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____
DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com
NewsArchive
12-16-2011, 01:39 AM
I have a similar issue...
>>Registering an OCX is nothing more than calling into the registration
>>function of the component. The component itself does all the
>>un-/registration stuff.
The problem is that my program uses the CJ OCX's and I need to install only
if the OCX has not been found registered else... if/when the developer
removes the beta/regular exe the OCX would be removed too. Also my
installation could/would alter the phyiscal location of the OCX, this could
be an issue on developer machines.
1) I do not want to alter the OCX path of a previous installation (not all
OCX's reside in the same place)
2) I do not want to add multiple copies of an OCX onto a machine
3) Register only if "Not Registered"
db
NewsArchive
12-16-2011, 01:39 AM
Hi David,
> The problem is that my program uses the CJ OCX's and I need to install only
> if the OCX has not been found registered else... if/when the developer
> removes the beta/regular exe the OCX would be removed too. Also my
> installation could/would alter the phyiscal location of the OCX, this could
> be an issue on developer machines.
>
> 1) I do not want to alter the OCX path of a previous installation (not all
> OCX's reside in the same place)
> 2) I do not want to add multiple copies of an OCX onto a machine
> 3) Register only if "Not Registered"
I'm pretty sure you can find the registered OCX under
HKEY_CLASSES_ROOT\Wow6432Node\CLSID on 64bit or some such location in the
registry. So if it's the same OCX it _should_ be possible to find it in the
registry and check if it's there or not:)
Best regards,
--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
https://twitter.com/#!/Icetips -
https://www.facebook.com/pages/Icetips-Alta-LLC/177947342793
NewsArchive
12-16-2011, 01:39 AM
Hi David,
> 1) I do not want to alter the OCX path of a previous installation (not all
> OCX's reside in the same place)
> 2) I do not want to add multiple copies of an OCX onto a machine
> 3) Register only if "Not Registered"
What Arnór said. You have to search the registry for the specific CLSID or
Class Name.
Please note that the CLSID might change from OCX build to build! So if you
distribute a new version of the OCX, it might be possible to update your
CLSID search item.
Similar to this. Open the OCX with OleView.exe and you should see the
unique GUID (uuid). Then check the registry HKCR\CLSID\{guidInQuestion} to
determine if it's registered.
Friedrich
NewsArchive
12-17-2011, 07:53 AM
My major concern was that the new installed location modifies the
InprocServer settings.
This is for my OCXinterrogator, a swiss army knife for COM/OLE/OCX.
It has the same basic feature set of OLEView plus it allows interaction with
the COM/OLE/OCX.
See attached (OCXi with the DSOFramer loaded)
So I do know CLSID and where to check for it... it is just another thing to
add to the "To do" list.
Time is not my friend!
Thanks
db
NewsArchive
12-17-2011, 07:54 AM
For info :
I used my installer on my main machine (which I never do) and the ocx
were registered during this and placed in my folder
I deleted them as they are also placed in the codejock folder
noting worked in my app
????
I copied again the ocx files and all worked
SO :
when you install and register an OCX the PATH is stored so avoid
changing paths in installs or you will end up with several copies of
the registrations ....
--
JP
__________________________________________________ _____
For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____
DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com
NewsArchive
12-17-2011, 07:54 AM
Hi JP,
Multiple copies of an ActiveX control can be installed on the same Windows
system. However, only ONE of those copies can be registered at a time.
Whichever copy was last registered is the one used by all applications which
share that ActiveX control. When a new application that uses the ActiveX is
installed, it will install and register its own copy of the ActiveX. At
that point, any other applications which use the ActiveX will use the copy
installed and registered by the new application.
Friedrich
NewsArchive
12-17-2011, 07:55 AM
Yes this is what I feared (in a way)
is this not "problematic" ?
I install version X of Y ActiveX
Tomorrow you install version Z of the same ActiveX
Not only my app will (maybe) stop working (differences in versions)
BUT if day after tomorrow the user un install YOUR app then my app
dtops working!
--
JP
__________________________________________________ _____
For those who do not understand ... : "Qui bene amat bene castigat."
__________________________________________________ _____
DMC - Data Management Center : a tool to let you Migrate Import Export
Transfer your Data
www.dmc-fr.com
NewsArchive
12-17-2011, 07:55 AM
Hi JP,
> Yes this is what I feared (in a way)
>
> is this not "problematic" ?
>
> I install version X of Y ActiveX
> Tomorrow you install version Z of the same ActiveX
>
> Not only my app will (maybe) stop working (differences in versions)
>
> BUT if day after tomorrow the user un install YOUR app then my app dtops
> working!
Well, that's how Windows works ;-)
There are several different strategies, but all have their Pros and Cons.
One strategy is to install the OCX to a common folder (System32) and the
installer does a version check before it tries to replace the OCX. This
makes sure that only the latest version is installed.
But if the new version is not "backward" compatible then this will break all
applications that depend on the "old" version.
In short, there is no solution to this fundamental problem.
Most tool vendors will use different CLSIDs, meaning they are effectively
different controls, when the new OCX is incompatible with older versions.
This strategy requires that you install and register the OCX in your
application's folder.
Friedrich
NewsArchive
12-18-2011, 03:32 AM
Hi Friedrich,
> But if the new version is not "backward" compatible then this will break all
> applications that depend on the "old" version.
AKA DLL hell<g>
Best regards,
--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com
Icetips product subscriptions at http://www.icetips.com/subscribe.php
https://twitter.com/#!/Icetips -
https://www.facebook.com/pages/Icetips-Alta-LLC/177947342793
NewsArchive
12-20-2011, 01:34 AM
JP,
Codejock uses a different CLSID for each version.
db
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.