project1_TLB.pas文件:
constructor Tcorbadatamodule1Skeleton.Create(const InstanceName: string;
const Impl: IUnknown);
begin
inherited;
inherited InitSkeleton('corbadatamodule1', InstanceName, 'IDL
roject1/Icorbadatamodule1:1.0', tmMultiThreaded, True);
FIntf := Impl as Icorbadatamodule1;
FIntf.p_setskeleton(self);
end;
ucorbadatamodule1.pas文件:
Tcorbadatamodule1 = class(TCorbaDataModule, Icorbadatamodule1)
private
{ Private declarations }
b_clientexist:boolean;
iso_skeleton :ISkeletonObject;
...
end;
procedure Tcorbadatamodule1.p_setskeleton(const iu_skeleton:IUnknown);
begin
iso_skeleton :=iu_skeleton as ISkeletonObject;
end;
procedure Tcorbadatamodule1.timer1Timer(Sender: TObject);
begin
if b_clientexist then
b_clientexist :=false
else
if (iso_skeleton <>nil) then
repeat until iso_skeleton._release<=0;
end;