Step 1. Create Application with a TRPCBroker Component
The first step of this tutorial is to create a Delphi application that includes a TRPCBroker component.
To do this:
-
In Delphi, create a new application. Delphi will create a blank form, named Form1.
-
Set Form1's Caption property to Terminal Type Display.
-
From the Kernel component palette tab, add a TRPCBroker component to your form. The instance of the component should automatically be named RPCBroker1.
-
Leave the default values for Server and ListenerPort as is (they are retrieved from your workstation's Registry). In the next section of the tutorial, you will add code to retrieve these values at run-time from the workstation's Registry.
-
Set the ClearParameters and ClearResults properties to True if they are not set to True already. This ensures that each time a call to an RPC is made, the Results property is cleared beforehand, and the Param property is cleared afterwards.
Your form should look like:
The next tasks are to use the TRPCBroker component to retrieve the end-user workstation's RPC Broker server and port information, and then to establish a connection through the TRPCBroker component to the M server.