网站首页  词典首页

请输入您要查询的函数:

 

术语 netservertransportaddex
释义 NetServerTransportAddEx
语法:
C++
NET_API_STATUS NetServerTransportAddEx(
__in LPWSTR servername,
__in DWORD level,
__in LPBYTE bufptr
);
NetServerTransportAddEx功能
该NetServerTransportAddEx函数绑定到指定的服务器传输协议。这个扩展功能允许调用应用程序指定SERVER_TRANSPORT_INFO_0,SERVER_TRANSPORT_INFO_1,SERVER_TRANSPORT_INFO_2,或SERVER_TRANSPORT_INFO_3信息的Level。
参数
服务器名 [in]
一个字符串,它指定的远程服务器上的功能是执行名称的指针。如果该参数为NULL,则使用本地计算机。
Level [in]
指定一个值,表示数据的信息化Level。此参数可以是下列值之一。
ValueMeaning
0Specifies信息传输协议,包括姓名,地址和网络上的位置。在bufptr参数指向SERVER_TRANSPORT_INFO_0结构。
1Specifies信息传输协议,包括姓名,地址,网络位置和域。在bufptr参数指向SERVER_TRANSPORT_INFO_1结构。
2Specifies为1级相同的信息,与一个svti2_flags新增成员。在bufptr参数指向SERVER_TRANSPORT_INFO_2结构。
3Specifies为2级相同的信息,以增加信息的凭据。在bufptr参数指向SERVER_TRANSPORT_INFO_3结构。
bufptr [in]
一个缓冲区,它包含的数据的指针。这一数据格式取决于Level的参数值。
有关更多信息,请参阅网络管理功能的缓冲器。
返回值
如果函数成功,返回值是NERR_Success。
如果函数失败,返回值可以是下面的错误代码之一。
返回codeDescription
ERROR_ACCESS_DENIEDThe用户没有获得所需的信息。
ERROR_DUP_NAMEA存在重复的名称在网络上。
ERROR_INVALID_DOMAINNAMEThe域名找不到网络上。
ERROR_INVALID_LEVELThe价值Level参数指定无效。
ERROR_INVALID_PARAMETERA参数无效。
返回此错误,如果运输的名称或SERVER_TRANSPORT_INFO_0,SERVER_TRANSPORT_INFO_1,SERVER_TRANSPORT_INFO_2,或SERVER_TRANSPORT_INFO_3成员结构的传输地址所指向bufptr参数为null。此错误也返回传输地址,如果在SERVER_TRANSPORT_INFO_0,SERVER_TRANSPORT_INFO_1,SERVER_TRANSPORT_INFO_2,或SERVER_TRANSPORT_INFO_3结构长度委员指出的bufptr参数为零或超过MAX_PATH大(在Windef.h头文件中定义)。此错误也返回如果SERVER_TRANSPORT_INFO_2,或SERVER_TRANSPORT_INFO_3结构的旗帜委员指出的bufptr参数包含一个非法值。
此错误也返回其他无效的参数。
ERROR_NOT_ENOUGH_MEMORYInsufficient内存可用。
备注
管理员或服务器操作员本地组的成员才可以成功地执行NetServerTransportAddEx功能。
如果您添加的传输协议的服务器使用调用NetServerTransportAddEx功能,连接后仍然不会在服务器重新启动或重新启动。
该NetServerComputerNameAdd函数是一个实用的功能。它结合了NetServerTransportEnum函数和NetServerTransportAddEx功能的功能,允许您指定一个仿真服务器的名称。
在Windows Server 2008和Windows Vista带有Service Pack 1(SP1)中,与Windows远程文件服务器(休闲车)登记的每名划为限定范围的名称或一个非作用域的名称。每一个被添加到该系统将可以附加到的所有非范围的名称,或到一个作用域的名称份额。应用程序希望使用范围的功能,负责进行登记范围的端点作为新的名称,然后以适当的范围内的股票。这样,传统的用途是不以任何方式影响,因为他们继续登记股和非范围的地名名称的网络管理和网络共享管理功能。
甲范围的端点是通过调用与Level参数NetServerTransportAddEx功能设置为2和bufptr参数指出,与SVTI2_SCOPED_NAME位svti2_flags集成员值SERVER_TRANSPORT_INFO_2结构。甲范围的终点,也是通过调用与Level参数NetServerTransportAddEx功能设置为3和bufptr参数指出,与SVTI2_SCOPED_NAME位svti3_flags集成员值SERVER_TRANSPORT_INFO_3结构。
当SVTI2_SCOPED_NAME位值为交通设置,那么股票可以添加相应的服务器的名称(该SHARE_INFO_503结构shi503_servername成员在作用域的方式)使用NetShareAdd功能。如果有与SVTI2_SCOPED_NAME位值和shi503_servername成员提供的名义登记没有交通,然后共享作用域中添加方式是不会得逞的。
该NetShareAdd函数用于添加在服务器名参数指定的远程服务器上的共享范围。远程服务器中在bufptr参数传递SHARE_INFO_503 shi503_servername成员中指定必须被绑定到传输协议的使用范围为端点NetServerTransportAddEx功能。该SVTI2_SCOPED_NAME国旗必须被指定在SERVER_TRANSPORT_INFO_2或传输协议SERVER_TRANSPORT_INFO_3结构shi503_servername成员。该NetShareDelEx函数用于删除范围的份额。在NetShareGetInfo和NetShareSetInfo功能是用于获取和设置限定范围的信息共享。
范围的端点通常使用群集命名空间。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmserver.h(包括Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
网络管理概述
网络管理功能
服务器和工作站运输功能
NetServerComputerNameAdd
NetServerComputerNameDel
NetServerTransportAdd
NetServerTransportDel
NetServerTransportEnum
NetShareAdd
NetShareDelEx
NetShareGetInfo
NetShareSetInfo
SERVER_TRANSPORT_INFO_0
SERVER_TRANSPORT_INFO_1
SERVER_TRANSPORT_INFO_2
SERVER_TRANSPORT_INFO_3
SHARE_INFO_503
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月13日
==英文原文==NetServerTransportAddEx Function
The NetServerTransportAddEx function binds the specified server to the transport protocol. This extended function allows the calling application to specify the SERVER_TRANSPORT_INFO_0 , SERVER_TRANSPORT_INFO_1 , SERVER_TRANSPORT_INFO_2 , or SERVER_TRANSPORT_INFO_3 information levels.
Syntax
C++
NET_API_STATUS NetServerTransportAddEx(
__in LPWSTR servername,
__in DWORD level,
__in LPBYTE bufptr
);
Parameters
servername [in]
A pointer to a string that specifies the name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
level [in]
Specifies a value that indicates the information level of the data. This parameter can be one of the following values.
ValueMeaning
0Specifies information about the transport protocol, including name, address, and location on the network. The bufptr parameter points to a SERVER_TRANSPORT_INFO_0 structure.
1Specifies information about the transport protocol, including name, address, network location, and domain. The bufptr parameter points to a SERVER_TRANSPORT_INFO_1 structure.
2Specifies the same information as level 1, with the addition of an svti2_flags member. The bufptr parameter points to a SERVER_TRANSPORT_INFO_2 structure.
3Specifies the same information as level 2, with the addition of credential information. The bufptr parameter points to a SERVER_TRANSPORT_INFO_3 structure.

bufptr [in]
A pointer to the buffer that contains the data. The format of this data depends on the value of the level parameter.
For more information, see Network Management Function Buffers .
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_ACCESS_DENIEDThe user does not have access to the requested information.
ERROR_DUP_NAMEA duplicate name exists on the network.
ERROR_INVALID_DOMAINNAMEThe domain name could not be found on the network.
ERROR_INVALID_LEVELThe value specified for the level parameter is invalid.
ERROR_INVALID_PARAMETERA parameter is invalid.
This error is returned if the transport name or transport address member in the SERVER_TRANSPORT_INFO_0, SERVER_TRANSPORT_INFO_1, SERVER_TRANSPORT_INFO_2, or SERVER_TRANSPORT_INFO_3 structure pointed to by the bufptr parameter is null. This error is also returned if the transport address length member in the SERVER_TRANSPORT_INFO_0, SERVER_TRANSPORT_INFO_1, SERVER_TRANSPORT_INFO_2, or SERVER_TRANSPORT_INFO_3 structure pointed to by the bufptr parameter is zero or larger than MAX_PATH (defined in the Windef.h header file). This error is also returned if the flags member of the SERVER_TRANSPORT_INFO_2, or SERVER_TRANSPORT_INFO_3 structure pointed to by the bufptr parameter contains an illegal value.
This error is also returned for other invalid parameters.
ERROR_NOT_ENOUGH_MEMORYInsufficient memory is available.

Remarks
Only members of the Administrators or Server Operators local group can successfully execute the NetServerTransportAddEx function.
If you add a transport protocol to a server using a call to the NetServerTransportAddEx function, the connection will not remain after the server reboots or restarts.
The NetServerComputerNameAdd function is a utility function. It combines the features of the NetServerTransportEnum function and the NetServerTransportAddEx function, allowing you to specify an emulated server name.
On Windows Server 2008 and Windows Vista with Service Pack 1 (SP1), every name registered with the Windows remote file server (SRV) is designated as either a scoped name or a non-scoped name. Every share that is added to the system will then either be attached to all of the non-scoped names, or to a single scoped name. Applications that wish to use the scoping features are responsible for both registering the new name as a scoped endpoint and then creating the shares with an appropriate scope. In this way, legacy uses of the Network Management and Network Share Management functions are not affected in any way since they continue to register shares and names as non-scoped names.
A scoped endpoint is created by calling the NetServerTransportAddEx function with the level parameter set to 2 and the bufptr parameter pointed to a SERVER_TRANSPORT_INFO_2 structure with the SVTI2_SCOPED_NAME bit value set in svti2_flags member. A scoped endpoint is also created by calling the NetServerTransportAddEx function with the level parameter set to 3 and the bufptr parameter pointed to a SERVER_TRANSPORT_INFO_3 structure with the SVTI2_SCOPED_NAME bit value set in svti3_flags member.
When the SVTI2_SCOPED_NAME bit value is set for a transport, then shares can be added with a corresponding server name (the shi503_servername member of the SHARE_INFO_503 structure) in a scoped fashion using the NetShareAdd function. If there is no transport registered with the SVTI2_SCOPED_NAME bit value and the name provided in shi503_servername member, then the share add in a scoped fashion will not succeed.
The NetShareAdd function is used to add a scoped share on a remote server specified in the servername parameter. The remote server specified in the shi503_servername member of the SHARE_INFO_503 passed in the bufptr parameter must have been bound to a transport protocol using the NetServerTransportAddEx function as a scoped endpoint. The SVTI2_SCOPED_NAME flag must have been specified in the shi503_servername member of the SERVER_TRANSPORT_INFO_2 or SERVER_TRANSPORT_INFO_3 structure for the transport protocol. The NetShareDelEx function is used to delete a scoped share. The NetShareGetInfo and NetShareSetInfo functions are to used to get and set information on a scoped share.
Scoped endpoints are generally used by the cluster namespace.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLmserver.h (include Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
See Also
Network Management Overview
Network Management Functions
Server and Workstation Transport Functions
NetServerComputerNameAdd
NetServerComputerNameDel
NetServerTransportAdd
NetServerTransportDel
NetServerTransportEnum
NetShareAdd
NetShareDelEx
NetShareGetInfo
NetShareSetInfo
SERVER_TRANSPORT_INFO_0
SERVER_TRANSPORT_INFO_1
SERVER_TRANSPORT_INFO_2
SERVER_TRANSPORT_INFO_3
SHARE_INFO_503
Send comments about this topic to Microsoft
Build date: 8/13/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa370628(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 13:21:02