love521u / ff-activex-host

Automatically exported from code.google.com/p/ff-activex-host
0 stars 0 forks source link

Auto updating activex control using fractivex plugin #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If we modify the activex control and provide a new version by modifying cab
file and specify the new codebaseURL tag , the new control is not
downloaded on its own unlike IE.

 Tried changing the code like the below :
(a) iN CControlSite::Create (...)  stored the codebaseURL passed at the
first time. Then changed the activex control and prepared a new cab.
Compared the previous URL with the new one and download if any change like :

"  // Do we need to download the control?
   if ((FAILED(hr) && szCodebase) || isNewVersion ) "

It does download the new control , but Windows throws a message saying "
System settings change and we need to reboot the system". Actually after
reboot it updates the activex control. But this reboot requirement is being
shown only in firefox and not in IE , and is certainly not desirable.

-Praveen

Original issue reported on code.google.com by er.prave...@gmail.com on 29 Jul 2009 at 10:57

GoogleCodeExporter commented 8 years ago
I have attached an updated version of ControlSite.cpp that should resolve this 
issue.
The changes are all contained in CControlSite::Create function. In short it 
checks
the registered version of the file on the system and then compares that value 
to the
hash passed in the codebase value. If the value on the system is less then hash 
it
does not call CoCreateInstance as to not lock any files when it calls
CoGetClassObjectFromURL. It also uses CLSID_NULL in CoGetClassObjectFromURL 
which
should also help prevent the system change message. Of course if your control is
currently locked by another process (another open browser window/application 
with the
control loaded) you will be prompted for reboot just like would happen in 
Internet
Explorer. Hopefully this resolves the issue in a adequate manner and you can 
include
the file in the project.

-Brent Booker

Original comment by Booker.B...@gmail.com on 16 Sep 2009 at 7:55

Attachments:

GoogleCodeExporter commented 8 years ago
I also forgot to mention since the code in the previous post uses 
GetFileVersionInfo
you will need to adjust the project properties to link against version.lib.

-Brent Booker

Original comment by Booker.B...@gmail.com on 17 Sep 2009 at 2:29

GoogleCodeExporter commented 8 years ago

Original comment by leeor.ah...@gmail.com on 3 Nov 2009 at 8:29

GoogleCodeExporter commented 8 years ago

Original comment by leeor.ah...@gmail.com on 3 Nov 2009 at 9:50

GoogleCodeExporter commented 8 years ago
Merged Brent's changes to the trunk.

Original comment by leeor.ah...@gmail.com on 3 Nov 2009 at 9:51