
Originally Posted by
kasracer
Sounds like a regular firewall to me. It blocks IMs and lets you control your internet.
Allowing shutdown of a game or any other program is also simple. You transverse what's currently open and end it.
thanks for the information.. but how do we do this in C#? is it simply by searching the .exe filename in the Process and kill the program? If so, this comvigo program can even close Yahoo Messenger even though i change the file name of YM.
here's a sample code i found on the internet on closing program by searching its exe name in the Process...
Code:
Originally posted by pareshgh
Process []pArry = Process.GetProcesses();
foreach(Process p in pArry)
{
string s = p.ProcessName;
s = s.ToLower();
if (s.CompareTo("winword") ==0)
{
p.Kill();
}
}
but i believe this method won't work if we don't know the file name of the program (or if the user changes the .exe name)
thanks a lot