返回类的实例:
library SysSvr;
uses
ShareMem,
SysUtils,
Classes,
uISysSvr in 'uISysSvr.pas',
uSysSvr in 'uSysSvr.pas',
dmSys in 'dmSys.pas' {SqlServerDm: TDataModule},
HospitalConfigFrm in 'HospitalConfigFrm.pas' {HospitalConfigFrom},
SysSetParamsFrm in 'SysSetParamsFrm.pas' {SysSetParamsFrom},
AboutFrm in 'AboutFrm.pas' {AboutFrom},
Global in '../Global/Global.pas',
ChildFrm in '../Global/ChildFrm.pas' {ChildFrom};
{$R *.res}
function TObjSysSvr:TSysSvrClass;
begin
result:=TSysSvr;
end;
exports
TObjSysSvr;
begin
end.
unit uISysSvr;
interface
uses
Classes;
type
TISysSvr=class(TObject)
public
constructor Create(AHandle:THandle;const ExeFilePath:string)
virtual;abstract;
end;
TSysSvrClass=class of TISysSvr;
implementation
end.
unit uSysSvr;
interface
uses
Windows,Messages,Sysutils,variants,classes,DbClient,dmSys,
IniFiles,uISysSvr,StrUtils,forms,DB;
type
TSysSvr=class(TISysSvr)
private
public
constructor Create(AHandle:THandle;const ExeFilePath:string)
override;
destructor Destroy;override;
end;