2.1.4.1.10 GetNamedPipeInfo


Description

Retrieves information about the specified named pipe.

Syntax

BOOL GetNamedPipeInfo( HANDLE hNamedPipe, LPDWORD lpFlags, LPDWORD lpOutBufferSize, LPDWORD lpInBufferSize, LPDWORD lpMaxInstances )

Parameters

hNamedPipe
[input] A handle to the named pipe instance. The handle must have GENERIC_READ access to the named pipe.
This parameter can also be a handle to an anonymous pipe, as returned by the CreatePipe function.
lpFlags
[output] A pointer to a variable that receives the type of the named pipe. This parameter can be NULL if this information is not required. Otherwise, this parameter can be one or more of the following values.
PIPE_CLIENT_END The handle refers to the client end of a named pipe instance. This is the default.
PIPE_SERVER_END The handle refers to the server end of a named pipe instance. If this value is not specified, the handle refers to the client end of a named pipe instance.
PIPE_TYPE_BYTE The named pipe is a byte pipe. This is the default.
PIPE_TYPE_MESSAGE The named pipe is a message pipe. If this value is not specified, the pipe is a byte pipe.
lpOutBufferSize
[output] A pointer to a variable that receives the size of the buffer for outgoing data, in bytes. If the buffer size is zero, the buffer is allocated as needed. This parameter can be NULL if this information is not required.
lpInBufferSize
[output] A pointer to a variable that receives the size of the buffer for incoming data, in bytes. If the buffer size is zero, the buffer is allocated as needed. This parameter can be NULL if this information is not required.
lpMaxInstances
[output] A pointer to a variable that receives the maximum number of pipe instances that can be created. If the variable is set to PIPE_UNLIMITED_INSTANCES (255), the number of pipe instances that can be created is limited only by the availability of system resources. This parameter can be NULL if this information is not required.

Return

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Examples

Remark

See Also

CreateNamedPipe,GetNamedPipeHandleState

Header to Include

origin.h

Reference