CreatePipe equivalent?

  • Thread starter Thread starter Peter Sutcliffe
  • Start date Start date
P

Peter Sutcliffe

I want to do something (at least similar) to CreatePipe, using the .NET
framework.

I see that the System.IO.FileStream class overview mentions the ability to
'manipulate other file-related OS handles such as pipes'.

Can anyone point me in the direction of an appropriate article or example?

Should I be looking at another class altogether?

Thanks in advance.

Peter.
 
Peter,
CreatePipe returns a couple of Win32 Handles.

There are overloaded FileStream constructors that accepts Win32 Handles.

After you call CreatePipe you can pass the Win32 Handles to the FileStream
constructors that accept handles... (the overloaded versions that have
System.IntPtr type parameters).

I have not tried it for CreatePipe, but I have used it with CreateFile
handles and it works great!

Hope this helps
Jay
 
Back
Top