http://www.csdn.net/expert/topic/154/154686.shtm
http://www.csdn.net/expert/topic/127/127502.shtm
http://www.csdn.net/expert/Topic/186/186323.shtm
http://www.csdn.net/expert/Topic/162/162569.shtm
http://www.csdn.net/expert/Topic/123/123430.shtm我觉得你好像老是再问这个问题,大爷呀!
去搜你发的帖子吧?
或者你搜一搜“进程”
你是不是故意的!!!!!!~!

解决方案 »

  1.   

    uses tlhelp32;
    procedure TForm1.Button1Click(Sender: TObject);
    var lppe:Tprocessentry32;
        hh,tt:Thandle;
        tppe:TThreadEntry32;
        PId:Dword;
    begin
        hh:=createtoolhelp32snapshot(TH32CS_SNAPPROCESS,0);
        lppe.dwsize:=sizeof(lppe);
        tppe.dwsize:=sizeof(tppe);
        if process32first(hh,lppe) then
          repeat
               pid:=lppe.th32ProcessID;
              listbox1.items.add(format('<%x>%s',[pid,extractfilename(lppe.szExeFile)]));
              tt:=createtoolhelp32snapshot(TH32CS_SNAPTHREAD,0);
              if thread32first(tt,tppe) then
              repeat
                 if tppe.th32OwnerProcessID=pid then
                    listbox1.items.add(format('  theadid:<%x>',[tppe.th32threadid]));
              until not thread32next(tt,tppe);
              closehandle(tt);
          until not process32next(hh,lppe);
        CloseHandle(hh);
        edit1.text:=inttostr(listbox1.items.count);
    end;