- Recompilación en Delphi10 de todos los paquetes de RO para generar las DCU's en Lib\D10 - Recompilación en Delphi10 de todos los paquetes de DA para generar las DCU's en Lib\D10 git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@9 b6239004-a887-0f4b-9937-50029ccdca16
64 lines
1.6 KiB
ObjectPascal
64 lines
1.6 KiB
ObjectPascal
unit NamedPipeService_Impl;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ This unit was automatically generated by the RemObjects SDK after reading }
|
|
{ the RODL file associated with this project . }
|
|
{ }
|
|
{ This is where you are supposed to code the implementation of your objects. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
interface
|
|
|
|
uses
|
|
{vcl:} Classes, SysUtils,
|
|
{RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
|
|
{Generated:} NamedPipeLibrary_Intf;
|
|
|
|
type
|
|
{ TNamedPipeService }
|
|
TNamedPipeService = class(TRORemotable, INamedPipeService)
|
|
private
|
|
protected
|
|
{ INamedPipeService methods }
|
|
function GetPath: string;
|
|
function GetConnectedUsersCount: Integer;
|
|
function UpTime: DateTime;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
{Generated:} NamedPipeLibrary_Invk,
|
|
Windows;
|
|
|
|
procedure Create_NamedPipeService(out anInstance: IUnknown);
|
|
begin
|
|
anInstance := TNamedPipeService.Create;
|
|
end;
|
|
|
|
{ NamedPipeService }
|
|
|
|
function TNamedPipeService.GetConnectedUsersCount: Integer;
|
|
begin
|
|
Result := Random(100);
|
|
end;
|
|
|
|
function TNamedPipeService.GetPath: string;
|
|
begin
|
|
Result := GetEnvironmentVariable('Path');
|
|
end;
|
|
|
|
function TNamedPipeService.UpTime: DateTime;
|
|
begin
|
|
Result := GetTickCount / MSecsPerDay;
|
|
end;
|
|
|
|
initialization
|
|
Randomize;
|
|
TROClassFactory.Create('NamedPipeService', Create_NamedPipeService, TNamedPipeService_Invoker);
|
|
|
|
finalization
|
|
|
|
end.
|
|
|