术语 | netservertransportadd |
释义 | NetServerTransportAdd 语法: C++ NET_API_STATUS NetServerTransportAdd( __in LPWSTR servername, __in DWORD level, __in LPBYTE bufptr ); NetServerTransportAdd功能 该NetServerTransportAdd函数绑定服务器的传输协议。 扩展的功能NetServerTransportAddEx允许调用应用程序指定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结构。 bufptr [in] 一个缓冲区,它包含的数据的指针。 有关更多信息,请参阅网络管理功能的缓冲器。 返回值 如果函数成功,返回值是NERR_Success。 如果函数失败,返回值可以是下面的错误代码之一。 返回codeDescription ERROR_ACCESS_DENIEDThe用户没有获得所需的信息。 ERROR_DUP_NAMEA存在重复的名称在网络上。 ERROR_INVALID_DOMAINNAMEThe域名找不到网络上。 ERROR_INVALID_LEVELThe价值Level参数指定无效。 ERROR_INVALID_PARAMETERA参数无效。 返回此错误如果在SERVER_TRANSPORT_INFO_0结构svti0_transportname或svti0_transportaddress委员指出的bufptr参数是NULL。此错误也返回如果在SERVER_TRANSPORT_INFO_0结构svti0_transportaddresslength委员指出的bufptr参数为零或超过MAX_PATH大(在Windef.h头文件中定义)。 此错误也返回其他无效的参数。 ERROR_NOT_ENOUGH_MEMORYInsufficient内存可用。 备注 管理员或服务器操作员本地组的成员才可以成功地执行NetServerTransportAdd功能。 如果您添加的传输协议的服务器使用调用NetServerTransportAdd功能,连接后仍然不会在服务器重新启动或重新启动。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderLmserver.h(包括Lm.h) LibraryNetapi32.lib DLLNetapi32.dll 参见 网络管理概述 网络管理功能 服务器和工作站运输功能 NetServerComputerNameAdd NetServerComputerNameDel NetServerTransportAddEx NetServerTransportDel NetServerTransportEnum SERVER_TRANSPORT_INFO_0 SERVER_TRANSPORT_INFO_1 SERVER_TRANSPORT_INFO_2 SERVER_TRANSPORT_INFO_3 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月13日 ==英文原文==NetServerTransportAdd Function The NetServerTransportAdd function binds the server to the transport protocol. The extended function NetServerTransportAddEx allows the calling application to specify the SERVER_TRANSPORT_INFO_1 , SERVER_TRANSPORT_INFO_2 , and SERVER_TRANSPORT_INFO_3 information levels. Syntax C++ NET_API_STATUS NetServerTransportAdd( __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 the information level of the data. This parameter can be the following value. 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. bufptr [in] A pointer to the buffer that contains the data. 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 svti0_transportname or svti0_transportaddress member in the SERVER_TRANSPORT_INFO_0 structure pointed to by the bufptr parameter is NULL. This error is also returned if the svti0_transportaddresslength member in the SERVER_TRANSPORT_INFO_0 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 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 NetServerTransportAdd function. If you add a transport protocol to a server using a call to the NetServerTransportAdd function, the connection will not remain after the server reboots or restarts. 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 NetServerTransportAddEx NetServerTransportDel NetServerTransportEnum SERVER_TRANSPORT_INFO_0 SERVER_TRANSPORT_INFO_1 SERVER_TRANSPORT_INFO_2 SERVER_TRANSPORT_INFO_3 Send comments about this topic to Microsoft Build date: 8/13/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/aa370627(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。