![]() |
Shared DLLs usage count
I would to know if there is a way to automatically handle usage counting for shared DLLs. As you must know, Windows has a mechanism to keep count of shared DLLs, so that setup programs can know when to unregister and delete the shared DLL. I can't find any info on it.
thanks for any help |
Check out the VB Runtime Install script for details as it uses this counter.
Vytautas |
I can't find this script in the Examples folder...can you give me the exact name of the .nsi file?
|
I think that it's available in the NSIS Archive on the net. However you can also read the two articles in the NSIS Help file. Appendixes B9 and B10
Vytautas |
I'm using this script with some succes. Only, Microsoft recommends increasing Shared DLL count to 1 if the file is already present on the system, so that programs that didn't correctly increase DLL count still work after the user uninstalls your application.
I've tried implementing this in the UpgradeDLL macro in the following way: (last four lines are by me) code: Only this one seems to have some flaws. Can anyone spot what is going wrong? |
UpgradeDLL does not handle the shared DLL user count. You should update the AddSharedDLL function.
|
code: This seems to work perfectly. Thanks! |
| All times are GMT. The time now is 18:09. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.