In my application I need to retrieve a list of modules that are loaded in a process. The problem is that some of my users have outdated CPUs and will experience a short freezing episode when I enumerate the modules with this code:
var mProcess = Process.GetProcessById(Scans.ProcId);
foreach (ProcessModule a in mProcess.Modules)
Is there another way to do this? Preferably with WMI, but WMI does not have a field for Process Modules, that I know of
Thanks for the time!