Software Development Network>> .NET Development>> How to locate an loaded assembly?
There is an excellent and very interesting article at http://msdn.microsoft.com/msdnmag/issues/04/10/NETProcessBrowser/ that explains what you seem to be looking for.
It has source code to browse managed processes and their loaded assemblies.
If you just want to see if a dll is loaded (managed and unmanaged processes) the Process and ProcessModule will give you that info.
AppDomain.CurrentDomain.GetAssemblies() gives you the list of all assemblies loaded in the current app domain.
Michael Taylor - 2/7/06
How to locate an loaded assembly?
Karokpa
There is an excellent and very interesting article at http://msdn.microsoft.com/msdnmag/issues/04/10/NETProcessBrowser/ that explains what you seem to be looking for.
It has source code to browse managed processes and their loaded assemblies.
If you just want to see if a dll is loaded (managed and unmanaged processes) the Process and ProcessModule will give you that info.
Process[] arrProcesses = Process.GetProcesses();foreach (Process proc in arrProcesses)
{
Debug.WriteLine(proc.ProcessName);
try
{
foreach (ProcessModule procmod in proc.Modules)
{
Debug.WriteLine(String.Concat("\t", procmod.FileName));
}
}
catch
{
}
}
Noel Rice
Hephie
AppDomain.CurrentDomain.GetAssemblies() gives you the list of all assemblies loaded in the current app domain.
Michael Taylor - 2/7/06