public override void Run() { GetProcessesThreadEventArgs e1 = new GetProcessesThreadEventArgs(threadinfo, Client.RemoteEndPoint.ToString()); GetProcessesThreadEvent.OnGetProcessesThread(e1); threadinfo = null; //clean memory }
public void onProcessThreadInfo(object o, GetProcessesThreadEventArgs e) { try { if (e.RemoteIP != RemoteIP || PID != e._processThreadInfo.PID) { return; } string[] str = new string[7]; str[0] = e._processThreadInfo.ID.ToString(); str[1] = Convert.ToBoolean(e._processThreadInfo.Pritioity).ToString(); str[2] = e._processThreadInfo.WaitReason; str[3] = Convert.ToBoolean(e._processThreadInfo.PriorityBoost).ToString(); str[4] = e._processThreadInfo.PrivilegedProcessorTime; str[5] = e._processThreadInfo.StartTime; str[6] = e._processThreadInfo.Threadstate; ListViewItem itm = new ListViewItem(str, 0); listView1.Items.Add(itm); }catch {} }