网站首页  词典首页

请输入您要查询的函数:

 

术语 netwkstatransportenum
释义 NetWkstaTransportEnum
语法:
C++
NET_API_STATUS NetWkstaTransportEnum(
__in LPWSTR servername,
__in DWORD level,
__out LPBYTE *bufptr,
__in DWORD prefmaxlen,
__out LPDWORD entriesread,
__out LPDWORD totalentries,
__inout LPDWORD resumehandle
);
NetWkstaTransportEnum Function
该NetWkstaTransportEnum函数提供的信息传输是由重定向器,这是客户端计算机上生成文件请求到服务器的计算机软件管理协议。
参数
服务器名 [in]
一个字符串,它指定的DNS或NetBIOS的远程服务器上的功能是执行名称的指针。如果该参数为NULL,则使用本地计算机。
Level [in]
该所要求的数据资料的Level。此参数可以是以下值。
ValueMeaning
0Return工作站传输协议的信息。在bufptr参数指向一个WKSTA_TRANSPORT_INFO_0结构的数组。
bufptr [out]
一个缓冲区,接收数据的指针。这一数据格式取决于Level的参数值。此缓冲区分配制度,必须使用NetApiBufferFree释放功能。请注意,您必须释放缓冲区,即使函数ERROR_MORE_DATA或NERR_BufTooSmall失败。
prefmaxlen [in]
返回的数据的更好的最大长度,以字节为单位。如果您指定MAX_PREFERRED_LENGTH,功能分配用于数据所需的内存量。如果指定这个参数在另一个值,它可以限制的字节数函数返回。如果缓冲区大小不足以容纳所有作品,该函数返回ERROR_MORE_DATA或NERR_BufTooSmall。有关更多信息,请参阅网络管理功能,缓冲器和网络管理功能缓冲区长度。
entriesread [out]
一个值,接收元素计数实际列举的指针。
totalentries [out]
一个值,得到了本来可以参赛作品总数的指针从当前列举的恢复状况。请注意,应用程序应考虑仅作为提示此值。
resumehandle [ in , out ]
一个值,包含一个恢复处理,用于继续现有的工作站运输搜索指针。手柄应在第一次调用零,离开后续调用不变。如果resumehandle参数是NULL指针,没有恢复处理存储。
返回值
如果函数成功,返回值是NERR_Success。
如果函数失败,返回值可以是下面的错误代码之一。
返回codeDescription
ERROR_MORE_DATAMore项可用。指定一个足够大的缓冲区接收的所有条目。
ERROR_INVALID_LEVELTheLevel参数,这表明什么程度的数据结构的信息可用,是无效的。此错误,则返回参数的Level,如果作为一个非零值指定。
ERROR_INVALID_PARAMETEROne或多个参数是无效的。返回此错误,如果bufptr或entriesread参数是NULL指针。
ERROR_NOT_ENOUGH_MEMORYInsufficient记忆可用来处理请求。
ERROR_NOT_SUPPORTEDThe不支持请求。返回此错误,如果远程服务器参数中指定的服务器名,这要求是不是在远程服务器上的支持。
NERR_BufTooSmallMore项可用。指定一个足够大的缓冲区接收的所有条目。此错误代码是定义在Lmerr.h头文件。
备注
没有特殊组成员必须成功地执行NetWkstaTransportEnum功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmwksta.h(包括Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
网络管理概述
网络管理功能
服务器和工作站运输功能
NetWkstaTransportAdd
NetWkstaTransportDel
WKSTA_TRANSPORT_INFO_0
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月13日
==英文原文==NetWkstaTransportEnum Function
The NetWkstaTransportEnum function supplies information about transport protocols that are managed by the redirector, which is the software on the client computer that generates file requests to the server computer.
Syntax
C++
NET_API_STATUS NetWkstaTransportEnum(
__in LPWSTR servername,
__in DWORD level,
__out LPBYTE *bufptr,
__in DWORD prefmaxlen,
__out LPDWORD entriesread,
__out LPDWORD totalentries,
__inout LPDWORD resumehandle
);
Parameters
servername [in]
A pointer to a string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
level [in]
The level of information requested for the data. This parameter can be the following value.
ValueMeaning
0Return workstation transport protocol information. The bufptr parameter points to an array of WKSTA_TRANSPORT_INFO_0 structures.

bufptr [out]
A pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. Note that you must free the buffer even if the function fails with ERROR_MORE_DATA or NERR_BufTooSmall.
prefmaxlen [in]
The preferred maximum length of returned data, in bytes. If you specify MAX_PREFERRED_LENGTH, the function allocates the amount of memory required for the data. If you specify another value in this parameter, it can restrict the number of bytes that the function returns. If the buffer size is insufficient to hold all entries, the function returns ERROR_MORE_DATA or NERR_BufTooSmall. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths .
entriesread [out]
A pointer to a value that receives the count of elements actually enumerated.
totalentries [out]
A pointer to a value that receives the total number of entries that could have been enumerated from the current resume position. Note that applications should consider this value only as a hint.
resumehandle [in, out]
A pointer to a value that contains a resume handle which is used to continue an existing workstation transport search. The handle should be zero on the first call and left unchanged for subsequent calls. If the resumehandle parameter is a NULL pointer, no resume handle is stored.
Return Value
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
Return codeDescription
ERROR_MORE_DATAMore entries are available. Specify a large enough buffer to receive all entries.
ERROR_INVALID_LEVELThe level parameter, which indicates what level of data structure information is available, is invalid. This error is returned if the level parameter is specified as a value other than zero.
ERROR_INVALID_PARAMETEROne or more parameters was invalid. This error is returned if the bufptr or the entriesread parameters are NULL pointers.
ERROR_NOT_ENOUGH_MEMORYInsufficient memory was available to process the request.
ERROR_NOT_SUPPORTEDThe request is not supported. This error is returned if a remote server was specified in servername parameter, and this request is not supported on the remote server.
NERR_BufTooSmallMore entries are available. Specify a large enough buffer to receive all entries. This error code is defined in the Lmerr.h header file.

Remarks
No special group membership is required to successfully execute the NetWkstaTransportEnum function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLmwksta.h (include Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
See Also
Network Management Overview
Network Management Functions
Server and Workstation Transport Functions
NetWkstaTransportAdd
NetWkstaTransportDel
WKSTA_TRANSPORT_INFO_0
Send comments about this topic to Microsoft
Build date: 8/13/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa370668(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:26:28