Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

GetNamedPipeInfo function

Retrieves information about the specified named pipe.

Syntax


BOOL WINAPI GetNamedPipeInfo(
  _In_       HANDLE hNamedPipe,
  _Out_opt_  LPDWORD lpFlags,
  _Out_opt_  LPDWORD lpOutBufferSize,
  _Out_opt_  LPDWORD lpInBufferSize,
  _Out_opt_  LPDWORD lpMaxInstances
);

Parameters

hNamedPipe [in]

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.

lpFlags [out, optional]

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.

ValueMeaning
PIPE_CLIENT_END
0x00000000

The handle refers to the client end of a named pipe instance. This is the default.

PIPE_SERVER_END
0x00000001

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
0x00000000

The named pipe is a byte pipe. This is the default.

PIPE_TYPE_MESSAGE
0x00000004

The named pipe is a message pipe. If this value is not specified, the pipe is a byte pipe.

 

lpOutBufferSize [out, optional]

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 [out, optional]

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 [out, optional]

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

CreateNamedPipe
GetNamedPipeHandleState
Pipe Functions
Pipes Overview

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.