From: Wes Aday : Would Process.GetProcesses() not do the same thing?
Yes it would. Thanks for the tip.
Collect array of processes:
Process [] localAll = Process.GetProcesses();
For each process get the modules:
ProcessModuleCollection myProcessModuleCollection = myProcess.Modules;
For each module process the filename:
myProcessModule = myProcessModuleCollection[i];
myProcessModule.FileName
That's what I need to do.
By modules, I mean I need to know exxactly which DLL and the filepath to them any process has loaded. You cannot replace a DLL if it is in use by a program.