I'm currently doing, in one of my project, a Homemade Task Manager. Everything was working fine until I implemented other functionality in my program. Exceptions are thrown as soon as I add the following lines in comments
Exception thrown: 'System.UriFormatException' in System.dll
Exception thrown: 'System.ComponentModel.Win32Exception' in System.dll
And Whenever I Start the program .exe made with the release build I got this:
System.ComponentModel.Win32Exception (0x80004005): Access is denied
Thanks
foreach (Process p in active_process)
{
ListViewItem process_list = new ListViewItem(p.ProcessName);
p.Refresh();
listView1.Items.Add(process_list); //Add Processes Name in Column 1
process_list.SubItems.Add(p.Id.ToString()); //Add Processes ID in Column 2
process_list.SubItems.Add(p.WorkingSet64.ToString()); //Add The physical memory used by processes in Column 3
//process_list.SubItems.Add(p.PriorityClass.ToString());//Add The priority degree of each processes in Column 4
//process_list.SubItems.Add(p.StartTime.ToString()); //Add The time at which each processes started in Column 5
process_list.Tag = p;
}