Hi Bruce, again,

Hmm.  Dunno if you know anything about this....

http://msdn2.microsoft.com/en-us/library/ms682055.aspx
"Any number of processes can share a console."

http://msdn2.microsoft.com/en-us/library/ms682075.aspx
"The GetStdHandle function provides a mechanism for retrieving the
standard input (STDIN), standard output (STDOUT), and standard error
(STDERR) handles associated with a process. During console creation,
the system creates these handles. Initially, STDIN is a handle to the
console's input buffer, and STDOUT and STDERR are handles of the
console's active screen buffer. However, the SetStdHandle function can
redirect the standard handles by changing the handle associated with
STDIN, STDOUT, or STDERR. Because the parent's standard handles are
inherited by any child process, subsequent calls to GetStdHandle
return the redirected handle. A handle returned by GetStdHandle may,
therefore, refer to something other than console I/O. For example,
before creating a child process, a parent process can use SetStdHandle
to set a pipe handle to be the STDIN handle that is inherited by the
child process. When the child process calls GetStdHandle, it gets the
pipe handle. This means that the parent process can control the
standard handles of the child process. The handles returned by
GetStdHandle have GENERIC_READ | GENERIC_WRITE access unless
SetStdHandle has been used to set the standard handle to have lesser
access."

So I wonder if I could have a tiny exe that console user could pipe into:

   xxx.exe | 2pp.exe

2pp.exe would arrange for it's stdin to get piped to a powerpro
plugin, which would do whatever.  



Reply via email to