以下这段程式是查看目前执行中的process,它找出来的是 ProcessID 而用于结束程序时则需要 ProcessHandle,
请问如何由 ProcessID 找出其 ProcessHandle
unit ufMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, TLHelp32;
type
TzfMain = class(TForm)
edNote: TMemo;
pnTop: TPanel;
bnList: TButton;
procedure FormCreate(Sender: TObject);
procedure bnListClick(Sender: TObject);
private
procedure ListJob();
public
end;
var
zfMain: TzfMain;
implementation
{$R *.dfm}
procedure TzfMain.FormCreate(Sender: TObject);
begin
//
end;
procedure TzfMain.bnListClick(Sender: TObject);
begin
ListJob();
end;
procedure TzfMain.ListJob();
var
mHPSnap,mHMSnap: integer;
mPE: tagProcessEntry32;
..
访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容