Ignore:
Timestamp:
Sep 17, 2008, 5:34:43 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Resync

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/GUI-config/CPRS-Lib/ORNet.pas

    r476 r492  
    11unit ORNet;
    22
     3{$DEFINE CCOWBROKER}
     4
    35interface
    46
    5 uses SysUtils, Windows, Classes, Forms, Controls, ORFn, TRPCB, RPCConf1, Dialogs; //, SharedRPCBroker;
     7uses SysUtils, Windows, Classes, Forms, Controls, ORFn, TRPCB, RPCConf1, Dialogs   
     8{$IFDEF CCOWBROKER}, CCOWRPCBroker {$ENDIF} ;  //, SharedRPCBroker;
     9
    610
    711procedure SetBrokerServer(const AName: string; APort: Integer; WantDebug: Boolean);
     
    2226function DottedIPStr: string;
    2327procedure CallRPCWhenIdle(CallProc: TORIdleCallProc; Msg: String);
     28
    2429procedure EnsureBroker;
    2530
     
    3136
    3237var
    33   //RPCBrokerV: TSharedRPCBroker;                        // an RPC Broker object - used by all calls
     38{$IFDEF CCOWBROKER}
     39  RPCBrokerV: TCCOWRPCBroker;
     40{$ELSE}
    3441  RPCBrokerV: TRPCBroker;
     42  //RPCBrokerV: TSharedRPCBroker;
     43{$ENDIF}
    3544  RPCLastCall: string;
    3645
     
    5867  if RPCBrokerV = nil then
    5968  begin
     69{$IFDEF CCOWBROKER}
     70    RPCBrokerV := TCCOWRPCBroker.Create(Application);
     71{$ELSE}
     72    RPCBrokerV := TRPCBroker.Create(Application);
    6073    //RPCBrokerV := TSharedRPCBroker.Create(Application);
    61     RPCBrokerV := TRPCBroker.Create(Application);
     74{$ENDIF}
    6275    with RPCBrokerV do
    6376    begin
     
    104117      vtInteger:    Param[i].Value := IntToStr(VInteger);
    105118      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;
    107123      //vtExtended:   Param[i].Value := FloatToStr(VExtended^);
    108124      vtExtended:   begin
     
    174190  RPCLastCall := RPCBrokerV.RemoteProcedure + ' (CallBroker begin)';
    175191  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
    177193  begin
    178194    ClearResults := True;
     
    339355  Screen.Cursor := crHourGlass;
    340356  SetParams(RPCName, AParam);
    341   CallBroker;  //RPCBrokerV.Call;     //kt note: this creates an error if connection was aborted.  Fix later
     357  CallBroker;  //RPCBrokerV.Call;
    342358  Screen.Cursor := SavedCursor;
    343359end;
Note: See TracChangeset for help on using the changeset viewer.