Ejemplo n.º 1
0
 public bool StartProcess()
 {
     if (this.ProcessName != "")
     {
         this.MyProcess = Process.GetProcessesByName(this.ProcessName);
         if (this.MyProcess.Length == 0)
         {
             int num = (int)MessageBox.Show(this.ProcessName + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             return(false);
         }
         else
         {
             this.processHandle = ProcessMemory.OpenProcess(2035711U, false, this.MyProcess[0].Id);
             if (this.processHandle != 0)
             {
                 return(true);
             }
             int num = (int)MessageBox.Show(this.ProcessName + " is not running or has not been found. Please check and try again", "Process Not Found", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             return(false);
         }
     }
     else
     {
         int num = (int)MessageBox.Show("Define process name first!");
         return(false);
     }
 }