See if any application has a DLL from the GAC loaded
Posted
by rwmnau
on Stack Overflow
See other posts from Stack Overflow
or by rwmnau
Published on 2009-11-19T22:58:49Z
Indexed on
2010/05/13
0:04 UTC
Read the original article
Hit count: 324
I'm trying to deploy new copies of my DLL to the GAC on remote servers, but I need to identify if any processes currently running have a loaded copy of the DLL I'm replacing - I'd like to restart them, or at least tell the user.
For example, Biztalk seems to load the DLLs it needs the first time they're used, and then replacing them keeps the old copy in memory until the Host Instances are restarted - something I could easily do as part of my deployment.
Is there a way to tell using .NET which processes have loaded a particular DLL from the GAC?
UPDATE:
Some further investigation shows that both Process Explorer has this functionality, and another Sysinternals tool, ListDLL, does exactly what I want to be able to do. I'd like to know how they do it, since I'd love to replicate this functionality in my application without having to include and screen-scrape ListDLL (if that's even allowed inside the license).
© Stack Overflow or respective owner