boolean SetExitApp(BSTR sExeName, BSTR sMenuText)
Function SetExitApp(sExeName As String, sMenuText As String) As Boolean
Sets the application to launch as well as the user menu.
Return value
True=successful, False=error, RF link lost, etc.
Parameters
sExeName
The name of the executable file (8.3, ".exe") to
launch at client exit.
sMenuText
The text line (one display length line minus 5 characters)
that shows up to the user in the main (connection) menu with the [F9] option. If
this string is empty, the option is not shown and [F9] has no effect.
Remarks
The run process is performed at exit time.
The existence of the application file in the RF terminal is not checked.
(DOS legacy)
Example
' Updates and runs an application, allows the user
to launch from menu.
Public wsRfIo As New RFIO
Public wsRfUsrApp As New RFUSRAPP
Dim iRes As Integer
Public Sub Main()
'--------------------------------------------------
' The user applicaiton when exit by F9 or after update
wsRfUsrApp.SetExitApp "SCANNING.EXE", "MASS SCAN"
'--------------------------------------------------
' Update applicaitons
' 0=RF Error, Transfer error
' 1=Don't needs update
' 2=Please, close the application to allow save and run
wsRfIo.RFPrint 0, 7, "Updating ...", WLNORMAL + WLFLUSHOUTPUT
iRes = wsRfUsrApp.UpdateApp("C:\MyApps", WLUA_SAVEANDRUN, WLUA_CLEANNO)
' Error
If iRes = 0 Then
wsRfError.ClearError
wsRfError.SetErrorLine "UPDATE", 0
wsRfError.SetErrorLine "ERROR", 1
wsRfError.Display 0
GoTo EndProgram
End If
' Not updated (files up-to-date),
' exit to app w/o file transfer to run
If iRes = 1 Then
wsRfUsrApp.ExitToApp WLUA_SAVEANDRUN, WLUA_CLEANNO
End If
' Here the RF connection is lost, exit the program
EndProgram:
End Sub