MD.Thread GetThread(long procId, long threadId) { MD.Process proc = GetProcess(procId); if (proc != null) { foreach (MD.Thread t in proc.GetThreads()) { if (t.ID == (int)threadId) { return(t); } } } return(null); }
public ThreadInfo[] GetThreads(long processId) { MD.Process p = GetProcess(processId); if (p == null) { return(new ThreadInfo [0]); } List <DL.ThreadInfo> list = new List <DL.ThreadInfo> (); foreach (MD.Thread t in p.GetThreads()) { DL.ThreadInfo ct = CreateThreadInfo(t); list.Add(ct); } return(list.ToArray()); }