A ArrayList ar = new ArrayList();
Process[] procs;
ProcessModuleCollection modules;
procs = Process.GetProcesses(@"Process1");
"A Composite Solution With Just One Click" - Certification Guaranteed 241 Microsoft 70-536 Exam
if (procs.Length > 0) {
modules = procs[0].Modules
foreach (ProcessModule mod in modules) {
ar.Add(mod.ModuleName);
}
}
B ArrayList ar = new ArrayList();
Process[] procs;
ProcessModuleCollection modules;
procs = Process.GetProcessesByName(@"Process1");
if (procs.Length > 0) {
modules = procs[0].Modules;
foreach (ProcessModule mod in modules) {
ar.Add(mod.FileName);
}
}
C ArrayList ar = new ArrayList();
Process[] procs;
ProcessModuleCollection modules;
procs =
Process.GetProcesses(@"C:\TestApps\Process1.exe");
if (procs.Length > 0) {
modules = procs[0].Modules
foreach (ProcessModule mod in modules) {
ar.Add(mod.ModuleName);
}
}
D ArrayList ar = new ArrayList();
Process[] procs;
ProcessModuleCollection modules;
procs = Process.GetProcessesByName(
@"C:\TestApps\Process1.exe");
if (procs.Length > 0) {
modules = procs[0].Modules;
foreach (ProcessModule mod in modules) {
ar.Add(mod.FileName);
}
}