Using NamedPipes in C#

  • Thread starter Thread starter ahmed.maryam
  • Start date Start date
A

ahmed.maryam

Hi All,

I want to set up a named pipe connection between two C# application
using visual studio 2005, does anyone know if there are any specific
namespaces or system calls that I need to make to access named pipes.
Even more important, does the .NET architecture even have support for
named pipes? I've looked on MSDN but the only named pipes examples
they have are in C++, thanks!

~ Maryam
 
Hi,


Hi All,

I want to set up a named pipe connection between two C# application
using visual studio 2005, does anyone know if there are any specific
namespaces or system calls that I need to make to access named pipes.
Even more important, does the .NET architecture even have support for
named pipes? I've looked on MSDN but the only named pipes examples
they have are in C++, thanks!

There are no support for named pipes in .NET. If you look into the archives
you may find the P/invoke code needed, even you could find a fully
implemented class.
 
Hi All,

I want to set up a named pipe connection between two C# application
using visual studio 2005, does anyone know if there are any specific
namespaces or system calls that I need to make to access named pipes.
Even more important, does the .NET architecture even have support for
named pipes? I've looked on MSDN but the only named pipes examples
they have are in C++, thanks!

You'll need to p/invoke CreateNamedPipe to create the pipe, however I think
you can connect to a named pipe just like a normal file, in which case the
client could be pure verifiable MSIL.
 
the next version of C# is going to support named pipes; it should be
out next month

-Todos
 
Hi All,

I want to set up a named pipe connection between two C# application
using visual studio 2005, does anyone know if there are any specific
namespaces or system calls that I need to make to access named pipes.
Even more important, does the .NET architecture even have support for
named pipes? I've looked on MSDN but the only named pipes examples
they have are in C++, thanks!

~ Maryam


Try Remoting using IPC channel, look for IpcClientChannel and IpcServerChannel in the docs.
IPC channel is implemented using named pipes.
Another option is using .NET Framework V3 WCF, with "NetNamedPipeBinding" channel. This one
is the fastest as it uses memory mapped files a IPC mechanism.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top