网站首页  词典首页

请输入您要查询的函数:

 

术语 multinetgetconnectionperformance
释义 MultinetGetConnectionPerformance
语法:
C++
DWORD MultinetGetConnectionPerformance(
__in LPNETRESOURCE lpNetResource,
__out LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
);
MultinetGetConnectionPerformance功能
该MultinetGetConnectionPerformance函数返回的信息用于访问网络资源的连接的预期效果。
参数
lpNetResource [in]
一个 NETRESOURCE结构,指定网络资源的指针。下面的成员在这方面的具体含义。
MemberMeaning
lpLocalNameA指向指定的缓冲区,如“F的本地设备,:”或的“lpt1”,这是重定向到一个网络资源的质疑。
如果这个成员是NULL或空字符串,网络资源中指定lpRemoteName成员。如果这个标志指定本地设备,lpRemoteName被忽略。
lpRemoteNameA指向网络资源的查询。目前的资源必须有一个建立的连接。例如,如果资源是一个文件服务器上的文件,然后打开该文件后会确保连接。
lpProviderUsually设置为NULL,但可以向业主(供应商资源)指针如果网络上的资源所在是众所周知的。
如果lpProvider成员不空,系统试图返回只有指定的网络信息。
lpNetConnectInfoStruct [out]
向NETCONNECTINFOSTRUCT结构,接收数据的指针。
返回值
如果函数成功,返回值为NO_ERROR。
如果函数失败,返回值是一个系统错误代码,如下列值之一。
返回codeDescription
ERROR_NOT_SUPPORTEDThe网络资源不提供这些信息。
ERROR_NOT_CONNECTEDThe的NETRESOURCE结构lpLocalName委员指出的lpNetResource参数没有指定重定向设备或lpRemoteName成员不指定一个当前连接的资源名称。
ERROR_NO_NET_OR_BAD_PATHThe操作无法完成,或者是因为网络组件没有启动,或因为指定的资源名称不承认。
ERROR_BAD_DEVICEThe本地设备的lpLocalName成员中指定无效。
ERROR_BAD_NET_NAMEThe网络名称无法找到。返回此错误如果NETRESOURCE结构lpLocalName委员指出的lpNetResource参数为NULL和NETRESOURCE结构lpRemoteName成员指出由lpNetResource也或NULL或无法通过任何网络的承认。
ERROR_INVALID_ADDRESSAn试图访问无效地址。返回此错误,如果lpNetResource或lpNetConnectInfoStruct参数为NULL。
ERROR_INVALID_PARAMETERA错误的参数获得通过。返回此错误,如果lpNetConnectInfoStruct参数不指向NETCONNECTINFOSTRUCT结构,其中cbStructure成员具有适当结构的大小填补。
ERROR_NO_NETWORKThe网络不可用。
ERROR_EXTENDED_ERRORA网络特定的错误。要获取该错误的描述,请WNetGetLastError。
备注
该MultinetGetConnectionPerformance函数返回1 NETCONNECTINFOSTRUCT结构的信息。
由MultinetGetConnectionPerformance函数返回的信息是估算值。网络流量和路由会影响结果的准确性返回。
请注意,MultinetGetConnectionPerformance函数只能用于请求为当地设备,重定向到网络资源,或对网络资源,而目前连接的信息。
如果一个UNC路径是在NETRESOURCE结构lpRemoteName成员中指定指出的lpNetResource参数的lpRemoteName成员必须是一个目录名,而不是一个文件名。
典型地使用此功能,就会打开一个网络服务器上的文件(这将确保有一个连接到文件),调用此函数,并利用其结果就如何管理文件I /决定? 。例如,您可以决定是否要读入一个客户端上的临时文件的全部文件或直接访问服务器上的文件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinnetwk.h
LibraryMpr.lib
DLLMpr.dll
Unicode和ANSI namesMultinetGetConnectionPerformanceW(Unicode)和MultinetGetConnectionPerformanceA(ANSI)的
参见
Windows网络(WNet)概述
Windows网络函数
NETCONNECTINFOSTRUCT
NETRESOURCE
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月6日
==英文原文==MultinetGetConnectionPerformance Function
The MultinetGetConnectionPerformance function returns information about the expected performance of a connection used to access a network resource.
Syntax
C++
DWORD MultinetGetConnectionPerformance(
__in LPNETRESOURCE lpNetResource,
__out LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
);
Parameters
lpNetResource [in]
A pointer to a NETRESOURCE structure that specifies the network resource. The following members have specific meanings in this context.
MemberMeaning
lpLocalNameA pointer to a buffer that specifies a local device, such as "F:" or "LPT1", that is redirected to a network resource to be queried.
If this member is NULL or an empty string, the network resource is specified in the lpRemoteName member. If this flag specifies a local device, lpRemoteName is ignored.
lpRemoteNameA pointer to a network resource to query. The resource must currently have an established connection. For example, if the resource is a file on a file server, then having the file open will ensure the connection.
lpProviderUsually set to NULL, but can be a pointer to the owner (provider) of the resource if the network on which the resource resides is known.
If the lpProvider member is not NULL, the system attempts to return information only about the named network.

lpNetConnectInfoStruct [out]
A pointer to the NETCONNECTINFOSTRUCT structure that receives the data.
Return Value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is a system error code , such as one of the following values.
Return codeDescription
ERROR_NOT_SUPPORTEDThe network resource does not supply this information.
ERROR_NOT_CONNECTEDThe lpLocalName member of the NETRESOURCE structure pointed to by the lpNetResource parameter does not specify a redirected device, or the lpRemoteName member does not specify the name of a resource that is currently connected.
ERROR_NO_NET_OR_BAD_PATHThe operation could not be completed, either because a network component is not started, or because the specified resource name is not recognized.
ERROR_BAD_DEVICEThe local device specified by the lpLocalName member is invalid.
ERROR_BAD_NET_NAMEThe network name cannot be found. This error is returned if the lpLocalName member of the NETRESOURCE structure pointed to by the lpNetResource parameter was NULL and the lpRemoteName member of the NETRESOURCE structure pointed to by the lpNetResource was also or NULL or could not recognized by any network.
ERROR_INVALID_ADDRESSAn attempt to access an invalid address. This error is returned if the lpNetResource or lpNetConnectInfoStruct parameters were NULL.
ERROR_INVALID_PARAMETERA bad parameter was passed. This error is returned if the lpNetConnectInfoStruct parameter does not point to a NETCONNECTINFOSTRUCT structure in which the cbStructure member is filled with the proper structure size.
ERROR_NO_NETWORKThe network is unavailable.
ERROR_EXTENDED_ERRORA network-specific error occurred. To obtain a description of the error, call WNetGetLastError .

Remarks
The MultinetGetConnectionPerformance function returns the information in a NETCONNECTINFOSTRUCT structure.
The information returned by the MultinetGetConnectionPerformance function is an estimate only. Network traffic and routing can affect the accuracy of the results returned.
Note that the MultinetGetConnectionPerformance function can be used only to request information for a local device that is redirected to a network resource, or for a network resource to which there is currently a connection.
If a UNC path is specified in the lpRemoteName member of the NETRESOURCE structure pointed to by the lpNetResource parameter, the lpRemoteName member must be a directory name, not a filename.
A typical way to use this function would be to open a file on a network server (which would ensure that there is a connection to the file), call this function, and use the results to make decisions about how to manage file I/O. For example, you can decide whether to read the entire file into a temporary file on the client or directly access the file on the server.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinnetwk.h
LibraryMpr.lib
DLLMpr.dll
Unicode and ANSI namesMultinetGetConnectionPerformanceW (Unicode) and MultinetGetConnectionPerformanceA (ANSI)
See Also
Windows Networking (WNet) Overview
Windows Networking Functions
NETCONNECTINFOSTRUCT
NETRESOURCE
Send comments about this topic to Microsoft
Build date: 8/6/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa385342(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 9:18:11