GetThreads() public method

public GetThreads ( ) : Thread[]
return Thread[]
コード例 #1
0
 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);
 }
コード例 #2
0
        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());
        }