GetNamedPipeInfo The GetNamedPipeInfo function retrieves information about the specified named pipe. BOOL GetNamedPipeInfo( HANDLE hNamedPipe, // handle to named pipe LPDWORD lpFlags, // pointer to flags indicating the pipe type LPDWORD lpOutBufferSize, // pointer to size of pipe's output buffer LPDWORD lpInBufferSize, // pointer to size of pipe's input buffer LPDWORD lpMaxInstances // pointer to the maximum number of pipe instances );
Parameters hNamedPipe Handle to the named pipe instance. The handle must have GENERIC_READ access to the named pipe. Windows NT: This parameter can also be a handle to an anonymous pipe, as returned by the CreatePipe function. lpFlags Pointer to a 32-bit variable that indicates the type of the named pipe. This parameter can be NULL if this information is not required. Otherwise, use the following values: Value Meaning 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 Pointer to a 32-bit variable that receives the size, in bytes, of the buffer for outgoing data. If the buffer size is zero, the buffer is allocated as needed. This parameter can be NULL if this information is not required. lpInBufferSize Pointer to a 32-bit variable that receives the size, in bytes, of the buffer for incoming data. If the buffer size is zero, the buffer is allocated as needed. This parameter can be NULL if this information is not required. lpMaxInstances Pointer to a 32-bit variable that receives the maximum number of pipe instances that can be created. If the variable is set to PIPE_UNLIMITED_INSTANCES, 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 Values 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. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Unsupported. Header: Declared in winbase.h. Import Library: Use kernel32.lib.
Private Declare Function GetNamedPipeInfo Lib "kernel32" Alias "GetNamedPipeInfo" (ByVal hNamedPipe As Long, lpFlags As Long, lpOutBufferSize As Long, lpInBufferSize As Long, lpMaxInstances As Long) As Long
The GetNamedPipeInfo function retrieves information about the specified named pipe. BOOL GetNamedPipeInfo(
HANDLE hNamedPipe, // handle to named pipe
LPDWORD lpFlags, // pointer to flags indicating the pipe type
LPDWORD lpOutBufferSize, // pointer to size of pipe's output buffer
LPDWORD lpInBufferSize, // pointer to size of pipe's input buffer
LPDWORD lpMaxInstances // pointer to the maximum number of pipe instances
);
Parameters
hNamedPipe
Handle to the named pipe instance. The handle must have GENERIC_READ access to the named pipe.
Windows NT: This parameter can also be a handle to an anonymous pipe, as returned by the CreatePipe function. lpFlags
Pointer to a 32-bit variable that indicates the type of the named pipe. This parameter can be NULL if this information is not required. Otherwise, use the following values: Value Meaning
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
Pointer to a 32-bit variable that receives the size, in bytes, of the buffer for outgoing data. If the buffer size is zero, the buffer is allocated as needed. This parameter can be NULL if this information is not required.
lpInBufferSize
Pointer to a 32-bit variable that receives the size, in bytes, of the buffer for incoming data. If the buffer size is zero, the buffer is allocated as needed. This parameter can be NULL if this information is not required.
lpMaxInstances
Pointer to a 32-bit variable that receives the maximum number of pipe instances that can be created. If the variable is set to PIPE_UNLIMITED_INSTANCES, 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 Values
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. QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.