ShellPipe control
=================

ShellPipe is a VB6 internal UserControl that can be
used to run external programs and communicate with
them via StdIn and StdOut.  StdErr is also redirected
to the same path as StdOut.  One could easily
separate out StdErr as another receive path in
ShellPipe if required.

It is patterned somewhat on the Microsoft Winsock
control in terms of methods and events.

This version uses a Timer control internally to
ShellPipe to accomodate the limitations of Win9x
platforms.  An NT-only version might be created using
async I/O if desired.

A different type of polling timer should be used if
this UserControl is changed to a VB6 Class module.

You could repackage this UserControl and compile it
as a separate OCX for reuse instead of adding the
source files to each VB project you create with it.

It would also be possible to modify ShellPipe to be
line-oriented on output from the spawned external
process.  In other words an event could be triggered
when a full line of output was received from the
spawned process.


Demo Projects
=============

There are three demonstration projects here:

SP Defuse     - Runs a simple VBScript (CScript) game.

SP Dispatcher - Runs several copies of a "worker"
                VBScript to complete a set of tasks,
                limiting the number active to a small
                pool of child processes.

SP FTP        - Runs ftps.exe as an external FTP client.

SP Netstat    - Runs Netstat.exe and scans for active
                Yahoo Messenger connections.

Note that SP FTP requires the freeware ftps.exe
utility from Standard Networks (or something similar)
since the FTP client that comes with Windows does not
use standard I/O streams for console I/O.

             http://www.stdnet.com/

Place ftps.exe into the SP FTP project folder or set
your PATH to include the path to ftps.exe as desired.


Using ShellPipe in Your Programs
================================

Copy three files into your program's project folder:

ShellPipe.ctl   ShellPipe UserControl source module.
ShellPipe.ctx   ShellPipe UserControl Binary Resource
                file.
SmartBuffer.cls SmartBuffer Class module.

Then add the .ctl and the .ctx file to your project
from the VB6 IDE's Project Explorer window:

             Right-click, Add|File...


Caveats
=======

This will not work with a program like the FTP.exe
included with Windows 2000, XP, etc.  Programs of that
type do direct console device I/O operations instead
of using standard I/O streams to talk to the console.

