根据pID 强制删除进程

 PROCESSENTRY32 pe;
 HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
 Process32First(hSnapshot, &pe);
 do
 {   
  char ccmd[200];
  memset(ccmd , 0, sizeof(ccmd));
  sprintf(ccmd, "ntsd -c q -p %d", pe.th32ProcessID);
  if (strstr( (pe.szExeFile),  ("watchclient.exe")) != NULL)
  { 
   int iRtn = system(ccmd);
  }

 }
 while(Process32Next(hSnapshot, &pe));

 CloseHandle(hSnapshot);  

你可能感兴趣的:(null,System)