<?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_TSharedRPCBroker_Example</id>
	<title>RPC HELP TSharedRPCBroker Example - 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_TSharedRPCBroker_Example"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_TSharedRPCBroker_Example&amp;action=history"/>
	<updated>2026-04-07T18:16:03Z</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_TSharedRPCBroker_Example&amp;diff=16924&amp;oldid=prev</id>
		<title>Kdtop: Created page with &quot; RPC Broker Help Home &lt;h2&gt;TSharedRPCBroker Example&lt;/h2&gt; The following example demonstrates how a TSharedRPCBroker component can be used to connect to the V...&quot;</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_TSharedRPCBroker_Example&amp;diff=16924&amp;oldid=prev"/>
		<updated>2015-07-08T17:31:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/RPC_Broker_Help&quot; title=&quot;RPC Broker Help&quot;&gt; RPC Broker Help Home&lt;/a&gt; &amp;lt;h2&amp;gt;TSharedRPCBroker Example&amp;lt;/h2&amp;gt; The following example demonstrates how a TSharedRPCBroker component can be used to connect to the V...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[RPC_Broker_Help| RPC Broker Help Home]]&lt;br /&gt;
&amp;lt;h2&amp;gt;TSharedRPCBroker Example&amp;lt;/h2&amp;gt;&lt;br /&gt;
The following example demonstrates how a TSharedRPCBroker component can be used to connect to the VistA M Server, execute various remote procedures, return the results and finally disconnect from the server. This example assumes that a TSharedRPCBroker component already exists on the form:&lt;br /&gt;
	&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;procedure&amp;#039;&amp;#039;&amp;#039; TForm1.Button1Click(Sender: TObject);&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;var&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
      i: Integer;&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;begin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
      &amp;#039;&amp;#039;&amp;#039;try&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;if not&amp;#039;&amp;#039;&amp;#039; SharedRPCBroker1.Connected &amp;#039;&amp;#039;&amp;#039;then&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
          SharedRPCBRoker1.Connected := True; {connect to the server}&lt;br /&gt;
        //assign RPC name&lt;br /&gt;
        SharedRPCBroker1.RemoteProcedure := &amp;#039;SOME APPLICATION RPC&amp;#039;;&lt;br /&gt;
        SharedRPCBroker1.Call; {make the call}&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;for&amp;#039;&amp;#039;&amp;#039; i=0 &amp;#039;&amp;#039;&amp;#039;to&amp;#039;&amp;#039;&amp;#039; Pred(SharedRPCBroker1.Results.Count) do&lt;br /&gt;
          ListBox1.Items.Add(SharedRPCBroker1.Results[i]); {display results}&lt;br /&gt;
      &amp;#039;&amp;#039;&amp;#039;except&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
        //put error handling code here&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;/div&gt;</summary>
		<author><name>Kdtop</name></author>
	</entry>
</feed>