<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vistapedia.com/index.php?action=history&amp;feed=atom&amp;title=RPC_HELP_Tutorial_Step_3</id>
	<title>RPC HELP Tutorial Step 3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://vistapedia.com/index.php?action=history&amp;feed=atom&amp;title=RPC_HELP_Tutorial_Step_3"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;action=history"/>
	<updated>2026-04-11T16:17:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;diff=17005&amp;oldid=prev</id>
		<title>Kdtop at 18:13, 15 July 2015</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;diff=17005&amp;oldid=prev"/>
		<updated>2015-07-15T18:13:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:13, 15 July 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[RPC_Broker_Help#Tutorial|Tutorial Home]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[RPC_Broker_Help#Tutorial|Tutorial Home]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;h2&amp;gt;Tutorial: Step 3 -- Establish Broker Connection&amp;lt;/h2&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;h2&amp;gt;Tutorial: Step 3 -- Establish Broker Connection&amp;lt;/h2&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now that your application can determine the appropriate RPC Broker server and port to connect to (Step 2), you can add code to establish a connection to the designated RPC Broker server from your application. The act of establishing a connection leads the user through signon. If signon succeeds, a connection is established.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now that your application can determine the appropriate RPC Broker server and port to connect to (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[RPC_HELP_Tutorial_Step_2|&lt;/ins&gt;Step 2&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;), you can add code to establish a connection to the designated RPC Broker server from your application. The act of establishing a connection leads the user through signon. If signon succeeds, a connection is established.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To establish a connection from your application to a RPC Broker server:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To establish a connection from your application to a RPC Broker server:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kdtop</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;diff=16655&amp;oldid=prev</id>
		<title>Kdtop at 20:44, 5 July 2015</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;diff=16655&amp;oldid=prev"/>
		<updated>2015-07-05T20:44:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:44, 5 July 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[RPC_Broker_Help| RPC Broker Help Home]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[RPC_Broker_Help#Tutorial|Tutorial Home]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;h2&amp;gt;Tutorial: Step 3 -- Establish Broker Connection&amp;lt;/h2&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;h2&amp;gt;Tutorial: Step 3 -- Establish Broker Connection&amp;lt;/h2&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now that your application can determine the appropriate RPC Broker server and port to connect to (Step 2), you can add code to establish a connection to the designated RPC Broker server from your application. The act of establishing a connection leads the user through signon. If signon succeeds, a connection is established.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now that your application can determine the appropriate RPC Broker server and port to connect to (Step 2), you can add code to establish a connection to the designated RPC Broker server from your application. The act of establishing a connection leads the user through signon. If signon succeeds, a connection is established.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kdtop</name></author>
	</entry>
	<entry>
		<id>https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;diff=16633&amp;oldid=prev</id>
		<title>Kdtop: Created page with &quot;&lt;h2&gt;Tutorial: Step 3 -- Establish Broker Connection&lt;/h2&gt; Now that your application can determine the appropriate RPC Broker server and port to connect to (Step 2), you can add...&quot;</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_Tutorial_Step_3&amp;diff=16633&amp;oldid=prev"/>
		<updated>2015-07-05T17:20:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;h2&amp;gt;Tutorial: Step 3 -- Establish Broker Connection&amp;lt;/h2&amp;gt; Now that your application can determine the appropriate RPC Broker server and port to connect to (Step 2), you can add...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;h2&amp;gt;Tutorial: Step 3 -- Establish Broker Connection&amp;lt;/h2&amp;gt;&lt;br /&gt;
Now that your application can determine the appropriate RPC Broker server and port to connect to (Step 2), you can add code to establish a connection to the designated RPC Broker server from your application. The act of establishing a connection leads the user through signon. If signon succeeds, a connection is established.&lt;br /&gt;
	&lt;br /&gt;
To establish a connection from your application to a RPC Broker server:&lt;br /&gt;
* Add code to Form1&amp;#039;s OnCreate event handler. The code should:&lt;br /&gt;
** Set brkrRPCBroker1&amp;#039;s Connected property to True (inside of an exception handler try...except block). This will cause an attempt to connect to the RPC Broker server.&lt;br /&gt;
** Check if an EBrokerError exception is raised. If this happens, connection failed, and your code should inform the user of this and terminate the application.&lt;br /&gt;
** The OnCreate event handler should now look like:&lt;br /&gt;
&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;procedure&amp;#039;&amp;#039;&amp;#039; TForm1.FormCreate(Sender: TObject);&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;var&amp;#039;&amp;#039;&amp;#039; ServerStr: String;&lt;br /&gt;
      PortStr: String;&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;begin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
      // Get the correct port and server from the Registry.&lt;br /&gt;
      &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039; GetServerInfo(ServerStr,PortStr)&amp;lt;&amp;gt; mrCancel &amp;#039;&amp;#039;&amp;#039;then begin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
        {connectOK begin}      &lt;br /&gt;
        brkrRPCBroker1.Server:=ServerStr;&lt;br /&gt;
        brkrRPCBroker1.ListenerPort:=StrToInt(PortStr);&lt;br /&gt;
        // Establish a connection to the RPC Broker server.&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;try&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
          brkrRPCBroker1.Connected:=True;&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;except&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
          &amp;#039;&amp;#039;&amp;#039;On&amp;#039;&amp;#039;&amp;#039; EBrokerError &amp;#039;&amp;#039;&amp;#039;do begin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
            {error begin}&lt;br /&gt;
            ShowMessage(&amp;#039;Connection to server could not be established!&amp;#039;);&lt;br /&gt;
            Application.Terminate;          &lt;br /&gt;
          &amp;#039;&amp;#039;&amp;#039;end;&amp;#039;&amp;#039;&amp;#039;  {error end}      &lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;end;&amp;#039;&amp;#039;&amp;#039; {try end}      &lt;br /&gt;
      &amp;#039;&amp;#039;&amp;#039;end&amp;#039;&amp;#039;&amp;#039; {connectOK end}&lt;br /&gt;
      &amp;#039;&amp;#039;&amp;#039;else begin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
        Application.Terminate;&lt;br /&gt;
      &amp;#039;&amp;#039;&amp;#039;end;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;end;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
NOTE Every call that invokes an RPC Broker server connection should be done in an &amp;quot;exception handler&amp;quot; try...except block, so that [[RPC_HELP_TRPCB_EBrokerError|EBrokerError]] exceptions can be trapped.&lt;br /&gt;
&lt;br /&gt;
* Save, compile and run your application. It should connect to the VistA M Server returned by the [[RPC_HELP_GetServerInfo|GetServerInfo]] function. You may be prompted to sign on with Access and Verify codes (unless Auto Signon is enabled, and you are already signed on). If you can connect successfully, your application will run (at this point, it is just a blank form). Otherwise, troubleshoot your RPC Broker connection until you can get your application to connect.&lt;br /&gt;
* If the server system defined in your Registry is not your development system (the one on which you will create [[RPC_HELP_RPCs|RPC]]s for this application), update your Registry using the ServerList.EXE program so that your application will connect to the proper VistA M Server.&lt;br /&gt;
	&lt;br /&gt;
Now that your application can establish a connection to the end-user&amp;#039;s server system, you can go about retrieving data from the VistA M Server.&lt;br /&gt;
&lt;br /&gt;
In the next steps of the tutorial, you will create a custom RPC that retrieves a list of all of the terminal types on the VistA M Server and call that [[RPC_HELP_RPCs|RPC]] from your application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;[[RPC_HELP_Tutorial_Step_2|PREV: Step 2: Get Server/Port]]&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;[[RPC_HELP_Tutorial_Step_4|NEXT: Step 4: RPC Routine to List Terminal Types]]&amp;lt;/h4&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kdtop</name></author>
	</entry>
</feed>