Hi,
In global method, I’m using a subclass Shell like below.
'shell handling…
ReDim mgetRepShell_EVENTVIEWER(-1) // Clear any prior shells
Dim shell_EVENTVIEWER As getRepShell_EVENTVIEWER
// Create a new shell
shell_EVENTVIEWER = New getRepShell_EVENTVIEWER
mgetRepShell_EVENTVIEWER.Append(shell_EVENTVIEWER)
With this Shell, I call plink.exe and send ‘tail -f’ command to a remote server. It works well.
However, I noticed that plink.exe executable file is not cleaned up properly after closing Application.
This thing doesn’t happen on other os command such as ls,cat and so on. I think this resulted from the specific ‘-f’ option of ‘tail’ command.
I think if I close the Shell before closing Application, I expect this issue doesn’t happen.
When I try to close the Shell like below in Close event of main Window, I got an error.
– Close event
getRepShell_EVENTVIEWER.close
“Static reference to instance method: call this on an instance of class Shell.”
I believe I’m coding incorrectly.
Can you let me know how to close the Shell?
I’m also using many subclass Shell like this, what is the best practice to clear up the used Shell?
Thanks in advance,