This article describes an All-In-One Code Framework sample that is available for download. This code sample demonstrates how to write Visual C++.NET, Visual C#, or Visual Basic.NET code to perform inter-process communications via named pipes.
To download this code sample, click the following link:
Named pipes are a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. In the sample package, you can find the code of a named pipe server end and a named pipe client end. The server end creates a pipe named "\\.\pipe\SamplePipe" to perform message-based communication. The pipe supports duplex connections, so both client and server can read from and write to the pipe. The security attributes of the pipe are customized to allow Authenticated Users read and write access to a pipe, and to allow the Administrators group full access to the pipe. When the pipe is connected by a client, the server attempts to read the client's message from the pipe, and write a response. The client end connects to the named pipe "\\.\pipe\SamplePipe" for message-based duplex communications with the server end. The client writes a message to the pipe and receives the response from the pipe server after the pipe is connected.
The named pipe client ends and server ends in the Visual C++, Visual C#, or Visual Basic .NET code sample packages are completely inter-operational.
Named pipe is a mechanism for one-way or bi-directional inter-process communication (IPC) between the pipe server and one or more pipe clients in the local machine or across the computers in the intranet.
For example, CSNamedPipeServer can serve as the server end of the named pipe to be connected by CppNamedPipeClient, CSNamedPipeClient and VBNamedPipeClient. CppNamedPipeClient is able to connect to CppNamedPipeServer, CSNamedPipeServer and VBNamedPipeServer.
Note For more information about how to create the sample application and how to deploy the sample application, see the Readme.txt file that is included in the download package.
This code sample contains the following programming languages:
Client-side Project Name
Server-side Project Name
This sample application was created by using Visual Studio 2008 with Service Pack 1 installed.
IPC, Named Pipe
What is All-In-One Code Framework?
All-In-One Code Framework shows most Microsoft development techniques by using code samples in different programming languages. Each example is carefully selected, composed, and documented to show one common code scenario. For more information about All-In-One Code Framework, visit the following Web site: http://1code.codeplex.com
How to find more All-In-One Code Framework samples