Sub OldSub
' now this sub became resumablesub, because it's calling an old sub that became resumablesub
' now, all calls to this sub will become resumablesub, and so on...
NewSub(me,"OldSub2")
End Sub
sub OldSub2(expected_value)
log(expected_value)
end sub
Sub NewSub(obj as object, method as string) ' it was just a regular sub before the shell
' this sub was not resumablesub, now it's needed.
Dim sh As Shell
sh.Initialize("sh","WHAREVER.EXE",Null)
sh.Run(-1)
Wait For sh_ProcessCompleted(Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
callsubdelayed(me, method,stdOut)
End Sub