Active Process Enumeration using C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I Wonder... How can I enumerate the active process using c#?
what is the ToolHelp32*.* C# equivalent?
What is the 'Process32First/Next' equivalent

Nadav.
 
Nadav,

Use the following code to enumerate the active processes on a
computer

Process[] running = Process.GetProcesses();
foreach(Process p in running)
Console.WriteLine(p.ProcessName);

If you specify a computer name in the GetProcesses() method, you
can retreive from a network location.

HTH,

//Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top