unit AsyncLibrary_Intf; {----------------------------------------------------------------------------} { 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, TypInfo, {RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf; const { Library ID } LibraryUID = '{D34B1991-1F3D-47A0-9984-50FE83013C35}'; TargetNamespace = ''; { Service Interface ID's } IAsyncService_IID : TGUID = '{D34B1991-1F3D-47A0-9984-50FE83013C35}'; { Event ID's } type { Forward declarations } IAsyncService = interface; { IAsyncService } IAsyncService = interface ['{D34B1991-1F3D-47A0-9984-50FE83013C35}'] function Sum(const A: Integer; const B: Integer): Integer; end; { CoAsyncService } CoAsyncService = class class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService; end; { TAsyncService_Proxy } TAsyncService_Proxy = class(TROProxy, IAsyncService) protected function __GetInterfaceName:string; override; function Sum(const A: Integer; const B: Integer): Integer; end; implementation uses {vcl:} SysUtils, {RemObjects:} uROEventRepository, uROSerializer, uRORes; { CoAsyncService } class function CoAsyncService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IAsyncService; begin result := TAsyncService_Proxy.Create(aMessage, aTransportChannel); end; { TAsyncService_Proxy } function TAsyncService_Proxy.__GetInterfaceName:string; begin result := 'AsyncService'; end; function TAsyncService_Proxy.Sum(const A: Integer; const B: Integer): Integer; begin try __Message.InitializeRequestMessage(__TransportChannel, 'AsyncLibrary', __InterfaceName, 'Sum'); __Message.Write('A', TypeInfo(Integer), A, []); __Message.Write('B', TypeInfo(Integer), B, []); __Message.Finalize; __TransportChannel.Dispatch(__Message); __Message.Read('Result', TypeInfo(Integer), result, []); finally __Message.UnsetAttributes(__TransportChannel); __Message.FreeStream; end end; initialization RegisterProxyClass(IAsyncService_IID, TAsyncService_Proxy); finalization UnregisterProxyClass(IAsyncService_IID); end.