Enum Modules For Pid : Process : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Process »

 

Enum Modules For Pid








    
 

using System;
using System.Diagnostics;

class MainClass {
    static void Main(string[] args) {
        int pID = 12345;
        Process theProc;
        try { theProc = Process.GetProcessById(pID); } catch {
            Console.WriteLine("bad PID!");
            return;
        }
        Console.WriteLine("Here are the loaded modules for: {0}", theProc.ProcessName);
        try {
            ProcessModuleCollection theMods = theProc.Modules;
            foreach (ProcessModule pm in theMods) {
                Console.WriteLine(string.Format("-> Mod Name: {0}", pm.ModuleName));
            }
        } catch { Console.WriteLine("No mods!"); }

    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Process