RPC HELP TVistaLogin LoginHandle

From VistApedia
Jump to: navigation, search

LoginHandle Property

Applies to

TVistaLogin class

Declaration

   property LoginHandle: String;

Description

The LoginHandle property is available at run-time only. It holds the Application Handle for the lmAppHandle mode of Silent Login. The Application Handle is obtained from the VistA M Server by a currently running application using the GetAppHandle function in the TRPCB Unit. The function returns a String value, which is then passed as a command line argument with an application that is being started. The new application must know to look for the handle, and if present, set up the Silent Login. The StartProgSLogin procedure in the RpcSLogin unit can be used directly or as an example of how the application would be started with a valid AppHandle as a command line argument. The CheckCmdLine procedure in the RpcSLogin unit can be used in an application to determine whether an AppHandle has been passed and to initiate the Broker connection or used as an example of how this could be done.

NOTE: The two procedures referenced here also pass the current Server, ListenerPort, and Division for the user so that the connection would be made to the same VistA M Server as the original application.

The AppHandle that is obtained via the GetAppHandle function is only valid for approximately 20 seconds, after which the Silent Login would fail.

NOTE: For a demonstration using the lmAppHandle, please run the lmAppHandle_Demo.EXE located in the ..\BDK32\Samples\SilentSignOn directory.