unit SingletonService_Impl; interface uses Classes, uROClientIntf, uROServer, uROServerIntf, ClassFactoryLibrary_Intf; type TSingletonService = class(TRORemotable, ISingletonService) private fValue : integer; protected procedure SetValue(const aValue: Integer); function GetValue: Integer; public constructor Create; override; end; implementation uses uROClassFactories, ClassFactoryLibrary_Invk; procedure Create_SingletonService(out anInstance : IUnknown); begin anInstance := TSingletonService.Create; end; { TSingletonService } constructor TSingletonService.Create; begin inherited; fValue := 0; end; function TSingletonService.GetValue: Integer; begin result := fValue end; procedure TSingletonService.SetValue(const aValue: Integer); begin fValue := aValue end; initialization TROSingletonClassFactory.Create('SingletonService', Create_SingletonService, TSingletonService_Invoker); finalization end.