I have the following code:
Process[] processes = Process.GetProcessesByName("IEXPLORE");
foreach (Process process in processes)
{
foreach (ProcessThread t in process.Threads)
{
int threadId = t.Id;
}
}
From here now that I have access to the threads in a process how can I do
the following:
Tell the CPU % the thread currently has?
Kill the thread?
We have a process that runs away once in a while and using one of
sysinternals tools have determined that we can SAFELY kill the thread and
the app will just restart it. We want to automate this using C#.
Thanks
Wayne