private void GenerateProcesses() { string layout = textBox_processes.Text; Regex regex = new Regex("\r\n"); string[] lines = regex.Split(layout); Processes.Clear(); comboBox_processes.Items.Clear(); foreach (string p in lines) { string[] pParts = p.Split(' '); if (pParts.Length >= 8) { int len = pParts.Length; if ( pParts[0] == "pid:" && pParts[2] == "pname:" && pParts[len - 4] == "tid:" && pParts[len - 2] == "kpobj:" ) { NtrProcess np = new NtrProcess(p); Processes.Add(np); int pid = np.Pid; string name = np.Name; comboBox_processes.Items.Add(string.Format("{0} | {1:X} : {2}", FillString(CheckSystem(name), 6), pid, name)); } } comboBox_processes.SelectedIndex = 0; } }
private void button_pTest_Click(object sender, EventArgs e) { const string p = "pid: 0x00000008, pname: gpio, tid: 0004013000001b02, kpobj: fff76fb0"; NtrProcess np = new NtrProcess(p); }