unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TDogCheckThread = class(TThread) //加密狗检测线程类
protected
procedure Execute; override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TDogCheckThread.Execute;
begin
while not Terminated do
begin
//此处放上你检测加密狗的代码
(*
......
if 加密狗不存在 then
begin
......
end;
*)
sleep(1000);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
//创建加密狗检测线程的实例并运行
TDogCheckThread.Create(False);
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TDogCheckThread = class(TThread) //加密狗检测线程类
protected
procedure Execute; override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TDogCheckThread.Execute;
begin
while not Terminated do
begin
//此处放上你检测加密狗的代码
(*
......
if 加密狗不存在 then
begin
......
end;
*)
sleep(1000);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
//创建加密狗检测线程的实例并运行
TDogCheckThread.Create(False);
end;
end.