<?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_TRPCBroker_RPCVersion_Example</id>
	<title>RPC HELP TRPCBroker RPCVersion 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_TRPCBroker_RPCVersion_Example"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_TRPCBroker_RPCVersion_Example&amp;action=history"/>
	<updated>2026-05-03T04:53:16Z</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_TRPCBroker_RPCVersion_Example&amp;diff=16592&amp;oldid=prev</id>
		<title>Kdtop: Created page with &quot;&lt;h2&gt;RPCVersion Example&lt;/h2&gt;  In the following example, an RPC is first called with two parameters that will be added together and the sum returned to the cli...&quot;</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_TRPCBroker_RPCVersion_Example&amp;diff=16592&amp;oldid=prev"/>
		<updated>2015-07-04T19:54:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;h2&amp;gt;RPCVersion Example&amp;lt;/h2&amp;gt;  In the following example, an &lt;a href=&quot;/index.php/RPC_HELP_RPCs&quot; title=&quot;RPC HELP RPCs&quot;&gt;RPC&lt;/a&gt; is first called with two parameters that will be added together and the sum returned to the cli...&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;RPCVersion Example&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the following example, an [[RPC_HELP_RPCs|RPC]] is first called with two parameters that will be added together and the sum returned to the client. Again, this same [[RPC_HELP_RPCs|RPC]] is called with the same parameters, however, this time it uses a different RPC version value. Thus, the two numbers are simply concatenated together and the resulting string is returned:&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h3&amp;gt;On the client:&amp;lt;/h3&amp;gt;&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;begin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
      {make sure the results get cleared}&lt;br /&gt;
      brkrRPCBroker1.ClearResults := True;&lt;br /&gt;
      {just re-use the same parameters}&lt;br /&gt;
      brkrRPCBroker1.ClearParameters := False;&lt;br /&gt;
      brkrRPCBroker1.RemoteProcedure := &amp;#039;MY APPLICATION REMOTE PROCEDURE&amp;#039;;&lt;br /&gt;
      brkrRPCBroker1.Param[0].Value := &amp;#039;333&amp;#039;;&lt;br /&gt;
      brkrRPCBroker1.Param[0].PType := literal;&lt;br /&gt;
      brkrRPCBroker1.Param[1].Value := &amp;#039;444&amp;#039;;&lt;br /&gt;
      brkrRPCBroker1.Param[1].PType := literal;&lt;br /&gt;
      brkrRPCBroker1.Call;&lt;br /&gt;
      {the result will be 777}&lt;br /&gt;
      Label1.Caption := &amp;#039;Result of the call: &amp;#039; + brkrRPCBroker1.Results[0];&lt;br /&gt;
      brkrRPCBroker1.RPCVersion := &amp;#039;2&amp;#039;;&lt;br /&gt;
      brkrRPCBroker1.Call;&lt;br /&gt;
      {the result will be 333444}&lt;br /&gt;
      Label2.Caption := &amp;#039;Result of the call: &amp;#039; + brkrRPCBroker1.Results[0];&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;end;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
On the server:&lt;br /&gt;
&lt;br /&gt;
    TAG(RESULT,PARAM1,PARAM2) ;Code for MY APPLICATION REMOTE PROCEDURE&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;IF&amp;#039;&amp;#039;&amp;#039; XWBAPVER&amp;lt;2 SET RESULT=PARAM1+PARAM2&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;ELSE SET&amp;#039;&amp;#039;&amp;#039; RESULT=PARAM1_PARAM2&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;QUIT&amp;#039;&amp;#039;&amp;#039; RESULT&lt;/div&gt;</summary>
		<author><name>Kdtop</name></author>
	</entry>
</feed>