My code extract all names of loaded modules from each running process, my approach goes like this answer.
Here is my code:
Process[] procs = Process.GetProcesses();
foreach (Process p in procs)
{
foreach (ProcessModule item in p.Modules)
{
Console.WriteLine(item.FileName);
}
}
Fore some reason, this approach have a very low performance :(
Is there another method or a different approach to get all those modules' names?
Any other solution that will run faster than that would be great
TIA