39 lines
889 B
ObjectPascal
39 lines
889 B
ObjectPascal
|
|
unit fClientForm;
|
||
|
|
|
||
|
|
interface
|
||
|
|
|
||
|
|
uses
|
||
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
|
||
|
|
uROClient, uROClientIntf, uRORemoteService, $MESSAGEUNIT, $CHANNELUNIT;
|
||
|
|
|
||
|
|
type
|
||
|
|
TClientForm = class(TForm)
|
||
|
|
ROMessage: TRO$MSGCLSNAME;
|
||
|
|
ROChannel: TRO$CHNCLSNAME;
|
||
|
|
RORemoteService: TRORemoteService;
|
||
|
|
private
|
||
|
|
{ Private declarations }
|
||
|
|
public
|
||
|
|
{ Public declarations }
|
||
|
|
end;
|
||
|
|
|
||
|
|
var
|
||
|
|
ClientForm: TClientForm;
|
||
|
|
|
||
|
|
implementation
|
||
|
|
|
||
|
|
{
|
||
|
|
The unit $SVCLIBNAME_Intf.pas will be generated by the RemObjects preprocessor the first time you
|
||
|
|
compile your server application. Make sure to do that before trying to compile the client.
|
||
|
|
|
||
|
|
To invoke your server simply typecast your server to the name of the service interface like this:
|
||
|
|
|
||
|
|
(RORemoteService as I$SVCNAME).Sum(1,2)
|
||
|
|
}
|
||
|
|
|
||
|
|
uses $SVCLIBNAME_Intf;
|
||
|
|
|
||
|
|
{$R *.dfm}
|
||
|
|
|
||
|
|
end.
|