Article ID: 2060067 - View products that this article applies to.
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.
Collapse this imageExpand this image
Download informationTo download this code sample, click the following link:
Technical overviewNamed 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.
LanguagesThis code sample contains the following programming languages:
Collapse this tableExpand this table
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:
How to find more All-In-One Code Framework samplesTo find more All-In-One Code Framework samples, you can simply click the following link:
For more information, visit the following Web sites:
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2060067 - Last Review: July 20, 2010 - Revision: 3.0
Contact us for more help