Changeset 492 for cprs/branches/GUI-config/CPRS-Lib/ORNet.pas
- Timestamp:
- Sep 17, 2008, 5:34:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/GUI-config/CPRS-Lib/ORNet.pas
r476 r492 1 1 unit ORNet; 2 2 3 {$DEFINE CCOWBROKER} 4 3 5 interface 4 6 5 uses SysUtils, Windows, Classes, Forms, Controls, ORFn, TRPCB, RPCConf1, Dialogs; //, SharedRPCBroker; 7 uses SysUtils, Windows, Classes, Forms, Controls, ORFn, TRPCB, RPCConf1, Dialogs 8 {$IFDEF CCOWBROKER}, CCOWRPCBroker {$ENDIF} ; //, SharedRPCBroker; 9 6 10 7 11 procedure SetBrokerServer(const AName: string; APort: Integer; WantDebug: Boolean); … … 22 26 function DottedIPStr: string; 23 27 procedure CallRPCWhenIdle(CallProc: TORIdleCallProc; Msg: String); 28 24 29 procedure EnsureBroker; 25 30 … … 31 36 32 37 var 33 //RPCBrokerV: TSharedRPCBroker; // an RPC Broker object - used by all calls 38 {$IFDEF CCOWBROKER} 39 RPCBrokerV: TCCOWRPCBroker; 40 {$ELSE} 34 41 RPCBrokerV: TRPCBroker; 42 //RPCBrokerV: TSharedRPCBroker; 43 {$ENDIF} 35 44 RPCLastCall: string; 36 45 … … 58 67 if RPCBrokerV = nil then 59 68 begin 69 {$IFDEF CCOWBROKER} 70 RPCBrokerV := TCCOWRPCBroker.Create(Application); 71 {$ELSE} 72 RPCBrokerV := TRPCBroker.Create(Application); 60 73 //RPCBrokerV := TSharedRPCBroker.Create(Application); 61 RPCBrokerV := TRPCBroker.Create(Application); 74 {$ENDIF} 62 75 with RPCBrokerV do 63 76 begin … … 104 117 vtInteger: Param[i].Value := IntToStr(VInteger); 105 118 vtBoolean: Param[i].Value := BoolChar[VBoolean]; 106 vtChar: Param[i].Value := VChar; 119 vtChar: if VChar = #0 then 120 Param[i].Value := '' 121 else 122 Param[i].Value := VChar; 107 123 //vtExtended: Param[i].Value := FloatToStr(VExtended^); 108 124 vtExtended: begin … … 174 190 RPCLastCall := RPCBrokerV.RemoteProcedure + ' (CallBroker begin)'; 175 191 if uShowRPCs then StatusText(RPCBrokerV.RemoteProcedure); 176 with RPCBrokerV do if not Connected then // Happens if broker connection is lost.192 with RPCBrokerV do if not Connected then // happens if broker connection is lost 177 193 begin 178 194 ClearResults := True; … … 339 355 Screen.Cursor := crHourGlass; 340 356 SetParams(RPCName, AParam); 341 CallBroker; //RPCBrokerV.Call; //kt note: this creates an error if connection was aborted. Fix later357 CallBroker; //RPCBrokerV.Call; 342 358 Screen.Cursor := SavedCursor; 343 359 end;
Note:
See TracChangeset
for help on using the changeset viewer.