Componentes.Terceros.RemObj.../internal/5.0.23.613/1/RemObjects SDK for Delphi/Samples/Async/AsyncLibrary_Invk.pas

60 lines
1.8 KiB
ObjectPascal
Raw Normal View History

unit AsyncLibrary_Invk;
{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading }
{ the RODL file associated with this project . }
{ }
{ Do not modify this unit manually, or your changes will be lost when this }
{ unit is regenerated the next time you compile the project. }
{----------------------------------------------------------------------------}
{$I Remobjects.inc}
interface
uses
{vcl:} Classes,
{RemObjects:} uROXMLIntf, uROServer, uROServerIntf, uROTypes, uROClientIntf,
{Generated:} AsyncLibrary_Intf;
type
{$M+}
TAsyncService_Invoker = class(TROInvoker)
private
protected
published
procedure Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
end;
{$M-}
implementation
uses
{RemObjects:} uRORes, uROClient;
{ TAsyncService_Invoker }
procedure TAsyncService_Invoker.Invoke_Sum(const __Instance:IInterface; const __Message:IROMessage; const __Transport:IROTransport; out __oResponseOptions:TROResponseOptions);
{ function Sum(const A: Integer; const B: Integer): Integer; }
var
A: Integer;
B: Integer;
lResult: Integer;
begin
try
__Message.Read('A', TypeInfo(Integer), A, []);
__Message.Read('B', TypeInfo(Integer), B, []);
lResult := (__Instance as IAsyncService).Sum(A, B);
__Message.InitializeResponseMessage(__Transport, 'AsyncLibrary', 'AsyncService', 'SumResponse');
__Message.Write('Result', TypeInfo(Integer), lResult, []);
__Message.Finalize;
__Message.UnsetAttributes(__Transport);
finally
end;
end;
end.