一发现qq2000b.exe运行,就把它关掉

解决方案 »

  1.   

    可以在后台监控,一旦发现QQ就关掉:
    关闭某个程序:  lppe:tprocessentry32;
       sshandle:thandle;
       hh:hwnd;
       found:boolean;begin
          
       //关闭***.exe
       sshandle:=createtoolhelp32snapshot(TH32CS_SNAPALL,0);
       found:=process32first(sshandle,lppe);
     //  str:=extractfilepath(paramstr(0))+'client.exe';
       while found do
       begin
      //进行你的处理其中lppe.szExefile就是程序名。
          str:=uppercase(extractfilename(lppe.szExeFile));
         if str='***.EXE' then
          begin
          hh:=OpenProcess(PROCESS_ALL_ACCESS,true,lppe.th32ProcessID);
          TerminateProcess(hh,0);
        end;
          found:=process32next(sshandle,lppe);
       end;
      

  2.   

    用FineWindow也行
    只要用spy++ 或winsight找到qq的类名就可以了
      

  3.   

    谢谢大家及各位高手了,我主要想知道如何通过直接控制端口的方法来屏蔽OICQ的运行的。
    谢谢大家。
      

  4.   

    楼上的,可以告诉我如何具体的实施,也就是说,如何封闭这些UDP端口吗?