GetNamedPipeInfo function (namedpipeapi.h)
Retrieves information about the specified named pipe.
Syntax
BOOL GetNamedPipeInfo(
[in] HANDLE hNamedPipe,
[out, optional] LPDWORD lpFlags,
[out, optional] LPDWORD lpOutBufferSize,
[out, optional] LPDWORD lpInBufferSize,
[out, optional] LPDWORD lpMaxInstances
);
Parameters
[in] hNamedPipe
A handle to the named pipe instance. The handle must have GENERIC_READ access to the named pipe for a read-only or read/write pipe, or it must have GENERIC_WRITE and FILE_READ_ATTRIBUTES access for a write-only pipe.
This parameter can also be a handle to an anonymous pipe, as returned by the CreatePipe function.
[out, optional] lpFlags
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.
[out, optional] lpOutBufferSize
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.
[out, optional] lpInBufferSize
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.
[out, optional] lpMaxInstances
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 value
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.
Remarks
Windows 10, version 1709: Pipes are only supported within an app-container; ie, from one UWP process to another UWP process that's part of the same app. Also, named pipes must use the syntax "\\.\pipe\LOCAL\" for the pipe name.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | namedpipeapi.h |
Library | Kernel32.lib |
DLL | Kernel32.dll |