<?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_CreateContext_Method</id>
	<title>RPC HELP TRPCBroker CreateContext Method - 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_CreateContext_Method"/>
	<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_TRPCBroker_CreateContext_Method&amp;action=history"/>
	<updated>2026-05-09T11:02:29Z</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_CreateContext_Method&amp;diff=16604&amp;oldid=prev</id>
		<title>Kdtop: Created page with &quot;&lt;h2&gt;CreateContext Method&lt;/h2&gt; Example  &lt;h3&gt;Applies to&lt;/h3&gt;     TRPCBroker component 	 &lt;h3&gt;Declarat...&quot;</title>
		<link rel="alternate" type="text/html" href="https://vistapedia.com/index.php?title=RPC_HELP_TRPCBroker_CreateContext_Method&amp;diff=16604&amp;oldid=prev"/>
		<updated>2015-07-05T13:50:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;h2&amp;gt;CreateContext Method&amp;lt;/h2&amp;gt; &lt;a href=&quot;/index.php/RPC_HELP_TRPCBroker_CreateContext_Method_Example&quot; title=&quot;RPC HELP TRPCBroker CreateContext Method Example&quot;&gt;Example&lt;/a&gt;  &amp;lt;h3&amp;gt;Applies to&amp;lt;/h3&amp;gt;     &lt;a href=&quot;/index.php/RPC_HELP_TRPCBroker&quot; title=&quot;RPC HELP TRPCBroker&quot;&gt;TRPCBroker&lt;/a&gt; component 	 &amp;lt;h3&amp;gt;Declarat...&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;CreateContext Method&amp;lt;/h2&amp;gt;&lt;br /&gt;
[[RPC_HELP_TRPCBroker_CreateContext_Method_Example|Example]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Applies to&amp;lt;/h3&amp;gt;&lt;br /&gt;
    [[RPC_HELP_TRPCBroker|TRPCBroker]] component&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;h3&amp;gt;Declaration&amp;lt;/h3&amp;gt;&lt;br /&gt;
    function CreateContext(strContext: string): boolean;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Description&amp;lt;/h3&amp;gt;&lt;br /&gt;
You can use the &amp;#039;&amp;#039;&amp;#039;CreateContext&amp;#039;&amp;#039;&amp;#039; method of the [[RPC_HELP_TRPCBroker|TRPCBroker]] component to create a context for your application. To create context, pass an option name in the strContext parameter. If the function returns True, a context was created, and your application can use all [[RPC_HELP_RPCs|RPC]] entered in the option&amp;#039;s RPC multiple. If the [[RPC_HELP_TRPCBroker|TRPCBroker]] component is not connected at the time context is created, a connection will be established. If for some reason a context could not be created, the &amp;#039;&amp;#039;&amp;#039;CreateContext&amp;#039;&amp;#039;&amp;#039; method will return False.&lt;br /&gt;
	&lt;br /&gt;
Since context is nothing more than a client/server &amp;quot;B&amp;quot;-type option in the OPTION file (#19), standard MenuMan security is applied in establishing a context. Therefore, a context option can be granted to user(s) exactly the same way as regular options are done using MenuMan. Before any RPC can run, it must have a context established for it to on the VistA M Server. Thus, all RPCs must be registered to one or more &amp;quot;B&amp;quot;-type option(s). This plays a major role in Broker security.&lt;br /&gt;
	&lt;br /&gt;
A context cannot be established for the following reasons:&lt;br /&gt;
* The user has no access to that option.&lt;br /&gt;
* The option is temporarily out of order.&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
An application can switch from one context to another as often as it needs to. Each time a context is created the previous context is overwritten.&lt;br /&gt;
&lt;br /&gt;
NOTE: See the [[RPC_HELP_TRPCBroker_CurrentContext|CurrentContext]] property for information about saving off the current context in order to temporarily create a different context and then restore the previous context.&lt;br /&gt;
	&lt;br /&gt;
NOTE: See [[RPC_HELP_RPC_Limits|RPC Limits]] for information about the size of parameters and results that can be passed to and returned from the [[RPC_HELP_TRPCBroker|TRPCBroker]] component.&lt;br /&gt;
	&lt;br /&gt;
NOTE: Whenever the Broker makes a call to the VistA M Server, if the cursor is crDefault, the cursor is automatically changed to the hourglass symbol as seen in other Microsoft-compliant software. If the application has already modified the cursor from crDefault to something else, the Broker will not change the cursor.&lt;br /&gt;
	&lt;br /&gt;
NOTE: For a demonstration that creates an application context, please run the [[RPC_HELP_BrokerExampleEXE|BrokerExampleEXE]] located in the ..\BDK32\Samples\BrokerEx directory.&lt;/div&gt;</summary>
		<author><name>Kdtop</name></author>
	</entry>
</feed>