RPC HELP GetServerInfo Example

From VistApedia
Jump to: navigation, search

GetServerInfo Example

The following is example of the GetServerInfo function:

   procedure TForm1.btnConnectClick(Sender: TObject);
   var
     strServer, strPort: string;
   begin
     if GetServerInfo(strServer, strPort)<> mrCancel then begin {getsvrinfo begin}
       brkrRPCBroker1.Server := strServer;
       brkrRPCBroker1.ListenerPort := StrToInt(strPort);
       brkrRPCBroker1.Connected := True;
       {getsvrinfo end}
     end;
   end;

For a demonstration using the Broker and GetServerInfo function, please run the BrokerExample.EXE located in the ..\BDK32\Samples\BrokerEx directory.