Some kind of pipes in .NET?

  • Thread starter Thread starter EdgarBM
  • Start date Start date
E

EdgarBM

Hi,
does anyone know any kind of class from the .NET framework
which works like unix pipes?

Thank you in advance,
Edgar
 
EdgarBM said:
Hi,
does anyone know any kind of class from the .NET framework
which works like unix pipes?

Windows has NamedPipes. You have to create, and open a NamedPipe using
P/Invoke (CreateNamedPipe to create, CreateFile to open), but once you have
a handle to a pipe, you can use the FileStream(IntPtr...) constructor to
wrap it in a normal .NET IO.FileStream.

More generally .NET has Stream, which in a abstracttion for files, sockets,
etc.

David
 
Are you referring to NamedPipes such as IPC$ or piping
commands together using the '|' operator? If you are
looking for name pipes, read the previous post. As far as
I know .NET does not support piping commands. The only
language that I know that supports it is Perl and you can
install a Perl plugin into your .NET studio if piping is
that important to you.
 
Windows has NamedPipes. You have to create, and open a NamedPipe using
P/Invoke (CreateNamedPipe to create, CreateFile to open), but once you have
a handle to a pipe, you can use the FileStream(IntPtr...) constructor to
wrap it in a normal .NET IO.FileStream.

I am sure I've seen a .NET wrapper for Windows Pipes on GotDotNet. It was at
least one year ago. You should be able to find it in the samples section.
 
Back
Top