using System.Diagnostics;
public static Process[] GetProcesses();public static Process[] GetProcesses(string);
Sample:
Process[] procList = Process.GetProcesses();
for ( int i=0; i<20; i++)
{
string strProcName = procList[i].ProcessName;
int iProcID = procList[i].Id;
}
If you want processes on the local machine, you use GetProcesses(), else you use GetProcesses(string machinename).
No comments:
Post a Comment