recieve method in VB6 dev fails, but compiled is o (wodSSH / wodSSH.NET)
Hi support, 2nd thread :)
I have seen some odd behaiviour when using the recieve method within the development environment (VB6) vs compiled program : basically, compiled always works, and dev mode always fails!
to explain :
[code]
Public Function DO_UNIX_COMMAND(UnixCommand As String, Caller As String) As String
On Error GoTo CommsError
Dim Response As String
Dim CommandTime As Date
CommandTime = Now
Response = NETCON.Execute(UnixCommand & vbLf)
Response = Replace(Response, vbCrLf, , , 1)
DO_UNIX_COMMAND = Response
Exit Function
CommsError:
Dim FailureText As String
Dim FailureNumber As Integer
Dim FailureDescription As String
FailureNumber = Err.Number
FailureDescription = Err.Description
FailureText = NETCON.Receive
COMMS_ERROR_HANDLER DO_UNIX_COMMAND ( & Caller & ) , FailureNumber, FailureDescription, FailureText
End Function
[/code]
the above is a trimmed down version of a routine i use for the entirity of my program after logging in to do any commands. the problem is within the error handler commserror . If i :
1/) start my program, and ensure it is constantly doing things with DO_UNIX_COMMAND
2/) login to my unix system, find the shell the program is using, then kill it (kill -9)
.... in 'fully compiled mode' this does not cause an issue, however when in the development mode, VB6 stops on NETCON.Receive (within the error handler), so i cannot test the remainder of the failure code.
i get informed 'not connected' which is true, in which case '.recieve' should either return anything in the buffer before disconnecting or nothing (returns nothing in compiled mode), but it doesnt do either in development mode!
is there anything i can do to 'get round' this?
birchsr
Complete thread:
- recieve method in VB6 dev fails, but compiled is o - birchsr, 2008-05-14, 14:48
- Re: recieve method in VB6 dev fails, but compiled - woddrazen, 2008-05-14, 15:02
- Re: recieve method in VB6 dev fails, but compiled - birchsr, 2008-05-14, 15:43
- Re: recieve method in VB6 dev fails, but compiled - woddrazen, 2008-05-14, 15:46
- Re: recieve method in VB6 dev fails, but compiled - birchsr, 2008-05-14, 15:43
- Re: recieve method in VB6 dev fails, but compiled - woddrazen, 2008-05-14, 15:02