I have added an little Handler to the JRDC server to be able to start a program from the Ipad
It is working but I don't know how to send the response when the program is finished
I cannot put resp As ServletResponse in the shl_ProcessCompleted sub
this is my code :
thanks
Yves67
It is working but I don't know how to send the response when the program is finished
I cannot put resp As ServletResponse in the shl_ProcessCompleted sub
this is my code :
B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)
resp.ContentType = "text/html"
Dim shl As Shell
Log ("Command shell F2A_SQL executed")
shl.Initialize("shl", "C:\ProgramData\JRDC\Start_F2A_SQL.bat", Null)
shl.Run(-1)
StartMessageLoop 'need to call this as this is a console app.
End Sub
Sub shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success And ExitCode = 0 Then
Log("Success")
Log(StdOut)
resp.Write("F2A_SQL Ended") Error ......
Else
Log("Error: " & StdErr)
resp.Write("F2A_SQL Erreur") Error .......
End If
End Sub
thanks
Yves67
Last edited by a moderator: