D
delphijob
Unregistered / Unconfirmed
GUEST, unregistred user!
unit2的代码如下:
unit Unit2;
interface
uses
Classes,Windows,Dialogs,SysUtils;
type
mythread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses unit1;
procedure mythread.Execute;
begin
{ Place thread code here }
exit;
end;
////////////////////////
unit3的代码如下:
unit Unit3;
interface
uses
Classes,Windows,Dialogs,SysUtils;
type
restore_thread= class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses unit1;
procedure restore_thread.Execute;
begin
{ Place thread code here }
exit;
end;
////////////////////////////
unit1中的代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, DB, ADODB,IniFiles, ComCtrls;
var
Form1: TForm1;
implementation
uses unit2,unit3;
var
thread1:mythread;
thread2:restore_thread;
procedure TForm1.Button1Click(Sender: TObject);
begin
thread2.Create(false);
thread1.Create(false);
end;
可是在form1里点击按扭的时候就报错了:
access voilation at address 00423160 in module 'project2.exe'.write or address OOOOOOOE
知道原因的朋友们请指点指点啊!
unit Unit2;
interface
uses
Classes,Windows,Dialogs,SysUtils;
type
mythread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses unit1;
procedure mythread.Execute;
begin
{ Place thread code here }
exit;
end;
////////////////////////
unit3的代码如下:
unit Unit3;
interface
uses
Classes,Windows,Dialogs,SysUtils;
type
restore_thread= class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;
implementation
uses unit1;
procedure restore_thread.Execute;
begin
{ Place thread code here }
exit;
end;
////////////////////////////
unit1中的代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, DB, ADODB,IniFiles, ComCtrls;
var
Form1: TForm1;
implementation
uses unit2,unit3;
var
thread1:mythread;
thread2:restore_thread;
procedure TForm1.Button1Click(Sender: TObject);
begin
thread2.Create(false);
thread1.Create(false);
end;
可是在form1里点击按扭的时候就报错了:
access voilation at address 00423160 in module 'project2.exe'.write or address OOOOOOOE
知道原因的朋友们请指点指点啊!