Is it posible to read/write Named pipes using C#?
-
Tuesday, March 06, 2012 5:52 PM
Hello,
Could you please clarify wheather I can read/write in the Named Pipes using C#? (like VC++)
If so, please provide me some sample code.
regards
Mano
- Changed Type Reed Copsey, JrMVP, Moderator Tuesday, March 06, 2012 6:12 PM Is distinct question
All Replies
-
Tuesday, March 06, 2012 6:14 PMModerator
Yes, via NamedPipeServerStream and NamedPipeClientStream: http://msdn.microsoft.com/en-us/library/system.io.pipes.namedpipeserverstream.aspx and http://msdn.microsoft.com/en-us/library/system.io.pipes.namedpipeclientstream.aspx
The documentation linked above for those two classes show simple examples of how to use them to read and write to pipes.
Reed Copsey, Jr. - http://reedcopsey.com
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".- Proposed As Answer by Matthew Watson Wednesday, March 07, 2012 12:51 PM
- Marked As Answer by Yoyo JiangMicrosoft Contingent Staff, Moderator Monday, March 19, 2012 3:17 AM
-
Wednesday, March 07, 2012 3:18 AM
Hi ManoEG,
What you post can be implemented using NamedPipeServerStream object, the following code samples has published by C/S model,I hope it will solve your problem.
C# named-pipe server for IPC (CSNamedPipeSer
ver) The VC# code sample demonstrates creating a basic named pipe server for inter-process communication.
http://code.msdn.microsoft.com/CSNamedPipeServer-4c760c2c
C# named-pipe client for IPC (CSNamedPipeCli
ent) The VC# code sample demonstrates connecting to a named pipe for inter-process communication.
http://code.msdn.microsoft.com/CSNamedPipeClient-a36e1bbc
Sincerely,
Jason Wang
orichisonic http://blog.csdn.net/orichisonic If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
- Proposed As Answer by Yoyo JiangMicrosoft Contingent Staff, Moderator Friday, March 09, 2012 5:03 AM
- Marked As Answer by Yoyo JiangMicrosoft Contingent Staff, Moderator Monday, March 19, 2012 3:17 AM
-
Wednesday, March 07, 2012 11:29 AM
Hello,
Thanks for your reply.
I will explore with the samples provided by you.
Thansk & Regards
Mano
-
Friday, March 09, 2012 5:02 AMModerator
Hi Mano,
Welcome to the MSDN forum!
How is it going with the problem currently?
If you have any issue, please feel free to let us know.
If you have solved the issue, would you please help mark the helpful replies as answers?
Have a nice day!
yoyo
Yoyo Jiang[MSFT]
MSDN Community Support | Feedback to us

