Difference between revisions of "RPC HELP GetServerInfo"
From VistApedia
(Created page with "<h2>GetServerInfo Function</h2> Example The '''GetServerInfo''' function retrieves the end-user's selection of server and port to which to c...") |
|||
Line 1: | Line 1: | ||
<h2>GetServerInfo Function</h2> | <h2>GetServerInfo Function</h2> | ||
[[RPC_HELP_GetServerInfo_Example|Example]] | [[RPC_HELP_GetServerInfo_Example|Example]] | ||
+ | |||
The '''GetServerInfo''' function retrieves the end-user's selection of server and port to which to connect. Use this function to set a [[RPC_HELP_TRPCBroker|TRPCBroker]] component's [[RPC_HELP_TRPCBroker_Server|Server]] and [[RPC_HELP_TRPCBroker_ListenerPort|ListenerPort]] properties to reflect the end-user's choice before connecting to the VistA M Server. | The '''GetServerInfo''' function retrieves the end-user's selection of server and port to which to connect. Use this function to set a [[RPC_HELP_TRPCBroker|TRPCBroker]] component's [[RPC_HELP_TRPCBroker_Server|Server]] and [[RPC_HELP_TRPCBroker_ListenerPort|ListenerPort]] properties to reflect the end-user's choice before connecting to the VistA M Server. | ||
If there is more than one server/port from which to choose, GetServerInfo displays an application window that allows users to select a service to connect to: | If there is more than one server/port from which to choose, GetServerInfo displays an application window that allows users to select a service to connect to: | ||
− | |||
<h3>Applies to</h3> | <h3>Applies to</h3> |
Latest revision as of 17:09, 5 July 2015
GetServerInfo Function
The GetServerInfo function retrieves the end-user's selection of server and port to which to connect. Use this function to set a TRPCBroker component's Server and ListenerPort properties to reflect the end-user's choice before connecting to the VistA M Server.
If there is more than one server/port from which to choose, GetServerInfo displays an application window that allows users to select a service to connect to:
Applies to
RPCConf1 unit
Declaration
function GetServerInfo(var Server, Port: string): integer;
Description
The GetServerInfo function handles the following scenarios:
- If there are no values for server and port in the Windows Registry, GetServerInfo does not display its dialog window, and the automatic default values returned are BROKERSERVER/9200. GetServerInfo returns mrOK.
- If exactly one server and port entry is defined in the Windows Registry, GetServerInfo does not display its dialog window. The values in the single Windows Registry entry are returned to the calling application, with no user interaction. GetServerInfo returns mrOK.
- If more than one server and port entry exists in the Windows Registry, the dialog window is displayed. The only time that passed in server and port values will be returned to the calling application is if the user presses Cancel. However, if a user selects an entry and clicks on the OK button, the server and port parameters will be changed and returned to the calling application. GetServerInfo returns mrOK if the user pressed the OK button, or mrCancel if the user pressed the Cancel button.
NOTE: For a demonstration using the Broker and GetServerInfo function, please run the BrokerExample.EXE located in the ..\BDK32\Samples\BrokerEx directory.