p.StartTime 'p.StartTime' threw an exception of type 'System.ComponentModel.Win32Exception' em System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited) em System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) em System.Diagnostics.Process.GetProcessTimes() em System.Diagnostics.Process.get_StartTime()
var list = System.Diagnostics.Process.GetProcesses(); foreach (var p in list) { System.Diagnostics.PerformanceCounter pc = new System.Diagnostics.PerformanceCounter(); string processStartTime = string.Empty; if (p.StartTime != null) processStartTime = p.StartTime.ToString(); listbox1.Items.Add(p.ProcessName + " MainWindowHandle: " + p.MainWindowTitle + " process start time: " + processStartTime); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)