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.
 

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