TsendlostThread = class (TThread)
private
Fdsnmp: Tdsnmp;
protected
procedure Execute;
override;
published
constructor create;
destructor Destroy;
override;
property dsnmp:Tdsnmp read Fdsnmp write Fdsnmp;
end;
Tdsnmp = class(TDataModule)
private
{ Private declarations }
public
{ Public declarations }
FsendlostThread: TsendlostThread;
procedure recData;
end;
在线程的执行过程中直接调用这个过程,如:Fdsnmp.recData