Creating Named Pipes

The server process creates a named pipe by using DosCreateNPipe.

To create a named pipe, specify on the DosCreateNPipe function:

DosCreateNPipe returns a pipe handle that can be used in subsequent pipe operations.

Each named pipe must have a unique name of the following form:

    \PIPE\PipeName

The "\PIPE\" in the name above is required, but need not be uppercase. It is not the name of a subdirectory.

To open a pipe on a remote computer, the client process must specify the name of the server process that opened the pipe as part of the pipe name, as follows:

    \\Server\PIPE\PipeName

"\\Server" in the name above is the name of the remote computer; again, "\PIPE\" is required.

The name parameter must conform to the rules for OS/2 file names, but no actual file is created for the pipe.

Named pipes created with certain access modes prevent the named pipes' clients from using certain functions. If the named pipe is created with access mode NP_ACCESS_INBOUND, the named pipe's client cannot use these functions:

If the named pipe is created with access mode NP_ACCESS_OUTBOUND, the named pipe's client cannot use these functions: