Here is an update to ShellPipe.
This is version 7 which optionally breaks out child process output, i.e. data written to StdOut and StdErr can be received separately by the parent program. There are also some minor bug fixes.
By default the new property ErrAsOut = True, making version 7 highly compatible with earlier versions. But when ErrAsOut = False several new events, methods, and properties prefixed ErrXXXX come into play.
The hardest part about dropping version 7 into a project previously using an earlier version is that the buffer class SmartBuffer was renamed as a more modest SPBuffer (in response to several snide remarks about the grandiose name). So to "upgrade" a Project you now need to copy the new files ShellPipe.ctl, ShellPipe.ctx, and SPBuffer.cls into the Project folder
and also remove SmartBuffer.cls from the Project and add SPBuffer.cls to it instead.
So a .VBP beginning:
Code:
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\..\..\Windows\system32\stdole2.tlb#OLE Automation
Form=Form1.frm
UserControl=ShellPipe.ctl
Class=SmartBuffer; SmartBuffer.cls
Becomes:
Code:
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\Windows\system32\stdole2.tlb#OLE Automation
Form=Form1.frm
UserControl=ShellPipe.ctl
Class=SPBuffer; SPBuffer.cls
I hope you find it useful.
ShellPipe version 7 is attached here as a ZIP archive containing a very small VB6 Project that uses it. This Project just uses ShellPipe to run
cscript.exe against a supplied script
test.vbs, send some input to the script via StdIn and capture output from the script via the StdOut and StdErr streams.