网站首页  词典首页

请输入您要查询的函数:

 

术语 getnamedpipeinfo
释义 GetNamedPipeInfo
语法:
C++
BOOL WINAPI GetNamedPipeInfo(
__in HANDLE hNamedPipe,
__out_opt LPDWORD lpFlags,
__out_opt LPDWORD lpOutBufferSize,
__out_opt LPDWORD lpInBufferSize,
__out_opt LPDWORD lpMaxInstances
);
GetNamedPipeInfo功能
检索信息指定命名管道。
参数
hNamedPipe [in]
句柄到命名管道实例。句柄必须GENERIC_READ访问的命名管道读只读或读/写管道,或者必须有GENERIC_WRITE和FILE_READ_ATTRIBUTES一个只写管访问。
此参数也可以是一个处理一个匿名管道,由CreatePipe函数返回。
lpFlags [指出,可选]
一个变量,它接收的命名管道类型的指针。此参数可以为NULL,如果这个信息是不是必需的。否则,这个参数可以是一个或多个下列值。
ValueMeaning
PIPE_CLIENT_END
0x00000000The处理指的是一个命名管道实例的客户端。这是默认的。
PIPE_SERVER_END
0x00000001The处理指的是命名管道服务器端的实例。如果此值未指定处理指的是一个命名管道实例的客户端。
PIPE_TYPE_BYTE
0x00000000The命名管道是一个字节管道。这是默认的。
PIPE_TYPE_MESSAGE
0x00000004The命名管道是一个信息管道。如果该值未指定,管道是一个字节管道。
lpOutBufferSize [指出,可选]
一个变量,它接收的数据为即将离任的缓冲区大小,以字节的指针。如果缓冲区大小是零,缓冲区分配需要。此参数可以为NULL,如果这个信息是不是必需的。
lpInBufferSize [指出,可选]
一个变量,它接收传入的数据缓冲区大小,以字节的指针。如果缓冲区大小是零,缓冲区分配需要。此参数可以为NULL,如果这个信息是不是必需的。
lpMaxInstances [指出,可选]
一个变量,它接收的管道实例最多可以创建的指针。如果该变量设置为PIPE_UNLIMITED_INSTANCES(255)的管道,可以创造许多情况下只受系统资源的可用性。此参数可以为NULL,如果这个信息是不是必需的。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateNamedPipe
GetNamedPipeHandleState
管功能
管概述
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==GetNamedPipeInfo Function
Retrieves information about the specified named pipe.
Syntax
C++
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
0x00000000The handle refers to the client end of a named pipe instance. This is the default.
PIPE_SERVER_END
0x00000001The 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
0x00000000The named pipe is a byte pipe. This is the default.
PIPE_TYPE_MESSAGE
0x00000004The 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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateNamedPipe
GetNamedPipeHandleState
Pipe Functions
Pipes Overview
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa365445(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:23:29