Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DosMakeNmPipe (1.2)
◄Function Group► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSNMPIPES
USHORT DosMakeNmPipe(pszName, php, fsOpenMode, fsPipeMode, cbOutBuf,
cbInBuf, ulTimeOut)
PSZ pszName; /* pipe name */
PHPIPE php; /* pointer to pipe handle */
USHORT fsOpenMode; /* open mode of pipe */
USHORT fsPipeMode; /* pipe-specific modes */
USHORT cbOutBuf; /* number of bytes in output buffer */
USHORT cbInBuf; /* number of bytes in input buffer */
ULONG ulTimeOut; /* time-out value */
The DosMakeNmPipe function creates a named pipe and retrieves a handle that
can be used in subsequent pipe operations.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pszName Points to the null-terminated string that identifies the pipe.
The string must have the following form:
\pipe\name
The pipe name (name) must have the same format as an MS OS/2
filename and must be unique.
php Points to the variable that receives the handle of the named
pipe.
fsOpenMode Specifies the modes with which to open the pipe. This parameter
is a combination of an access-mode flag, an inheritance flag,
and a write-behind flag. The possible values are as follows:
Value Meaning
────────────────────────────────────────────────────────────────
NP_ACCESS_DUPLEX Pipe is full duplex──going to and from
server and client.
NP_ACCESS_INBOUND Pipe is inbound──going from client to
server.
NP_ACCESS_OUTBOUND Pipe is outbound──going from server to
client.
NP_INHERIT Pipe is inherited by any child processes
created by using the DosExecPgm function.
NP_NOINHERIT Pipe is private to the current process and
cannot be inherited.
NP_NOWRITEBEHIND Write-behind to remote pipes is not
allowed.
NP_WRITEBEHIND Write-behind to remote pipes is allowed.
fsPipeMode Specifies the pipe-specific modes of the pipe. This parameter is
a combination of an instance count, a read-mode flag, a type
flag, and a wait flag. The possible values are as follows:
Value Meaning
────────────────────────────────────────────────────────────────
NP_WAIT Functions that read from and write to
the pipe wait if no data is available.
NP_NOWAIT Functions that read from and write to
the pipe return immediately if no data
is available.
NP_READMODE_BYTE Read pipe as a byte stream.
NP_READMODE_MESSAGE Read pipe as a message stream.
NP_TYPE_BYTE Pipe is a byte-stream pipe.
NP_TYPE_MESSAGE Pipe is a message-stream pipe.
NP_UNLIMITED_INSTANCES Unlimited instances of the pipe can be
created. If this value is not specified,
a value in the range 1 through 254 can
be used for the number of instances.
cbOutBuf Specifies the number of bytes to reserve for the outgoing
buffer.
cbInBuf Specifies the number of bytes to reserve for the incoming
buffer.
ulTimeOut Specifies the default value (in milliseconds) of the time-out
parameter of the DosWaitNmPipe function.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
ERROR_INVALID_PARAMETER
ERROR_NOT_ENOUGH_MEMORY
ERROR_OUT_OF_STRUCTURES
ERROR_PATH_NOT_FOUND
ERROR_PIPE_BUSY
See Also
DosClose, DosExecPgm, DosWaitNmPipe
♦