Archive: About Reference Counting .DLLs


About Reference Counting .DLLs
I have several products that use the same DLLs. I want to make sure that if you uninstall one of them, it doesn't trash the DLLs that the other programs use. So, basically it's a shared .DLL scenario.

Is there a "built-in" way to handle this type of scenario, or is my best bet to store a reference count in HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs, and delete only when it reaches zero?

tia.


AddSharedDLL and un.RemoveSharedDLL should do the trick.


Wow. That's what I was in the process of writing. Glad to know there's a canned variety! Thanks for the pointer.