get the thread state of another process

  • Thread starter Thread starter Ha ha
  • Start date Start date
using system.Diagnostics;

....

Process[] notepads = Process.GetProcessesByName("notepad");
foreach(Process proc in notepads)
foreach(ProcessThread procThread in proc.Threads)
System.Console.WriteLine(procThread.ThreadState);

--Liam.
 
what i mean is to get a definit thread state .for example,
I start a thread named "mythread" in a process,in another process ,I
want to get the "mythread" state in first process.
 
Back
Top