网站首页  词典首页

请输入您要查询的函数:

 

术语 netservercomputernameadd
释义 NetServerComputerNameAdd
语法:
C++
NET_API_STATUS NetServerComputerNameAdd(
__in LPWSTR ServerName,
__in LPWSTR EmulatedDomainName,
__in LPWSTR EmulatedServerName
);
NetServerComputerNameAdd功能
该NetServerComputerNameAdd函数列举了运输上指定的服务器活动,并结合模拟的服务器名称的每个运输。
NetServerComputerNameAdd是一种实用工具函数,结合了NetServerTransportEnum函数和NetServerTransportAddEx功能的功能。
参数
服务器名 [in]
一个字符串指针,指定的远程服务器上的功能是执行的名称。如果该参数为NULL,则使用本地计算机。
EmulatedDomainName [in]
指针指向一个字符串,其中包含指定的域名服务器应使用它的存在时,宣布使用EmulatedServerName。此参数是可选的。
EmulatedServerName [in]
指向一个以空终止字符的字符串,其中包含模拟服务器的名称应开始除了由ServerName参数指定的名称支持。
返回值
如果函数成功,返回值是NERR_Success。请注意,如果成功NetServerComputerNameAdd仿真服务器名称被添加到指定至少一个运输。
如果函数失败,返回值可以是下面的错误代码之一。
返回codeDescription
ERROR_ACCESS_DENIEDThe用户没有获得所需的信息。
ERROR_DUP_NAMEA存在重复的名称在网络上。
ERROR_INVALID_DOMAINNAMEThe域名找不到网络上。
ERROR_INVALID_PARAMETERThe指定的参数无效。
ERROR_NOT_ENOUGH_MEMORYInsufficient内存可用。
备注
管理员或服务器操作员本地组的成员才可以成功地执行NetServerComputerNameAdd功能。
由服务器名参数指定的服务器继续支持所有的名字是支持,加上开始支持的NetServerComputerNameAdd函数调用成功,提供新的名字。
名称仿真,从结果调用NetServerComputerNameAdd终止时,服务器重新启动或重新启动。仿真停止名称由以前调用设置为NetServerComputerNameAdd无需重新启动或重新启动,您可以调用NetServerComputerNameDel功能。
该NetServerComputerNameAdd功能时通常使用系统管理员取代服务器,但希望保持对用户透明的转换。
实例
以下是一个调用榜样NetServerComputerNameAdd功能要求\\ \\点1还回应\\要求\\点2。
NetServerComputerNameAdd(Server1中,空,点2);
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmserver.h(包括Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
网络管理概述
网络管理功能
服务器功能
NetServerTransportEnum
NetServerTransportAdd
NetServerTransportAddEx
NetServerComputerNameDel
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月13日
==英文原文==NetServerComputerNameAdd Function
The NetServerComputerNameAdd function enumerates the transports on which the specified server is active, and binds the emulated server name to each of the transports.
NetServerComputerNameAdd is a utility function that combines the functionality of the NetServerTransportEnum function and the NetServerTransportAddEx function.
Syntax
C++
NET_API_STATUS NetServerComputerNameAdd(
__in LPWSTR ServerName,
__in LPWSTR EmulatedDomainName,
__in LPWSTR EmulatedServerName
);
Parameters
ServerName [in]
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.
EmulatedDomainName [in]
Pointer to a string that contains the domain name the specified server should use when announcing its presence using the EmulatedServerName. This parameter is optional.
EmulatedServerName [in]
Pointer to a null-terminated character string that contains the emulated name the server should begin supporting in addition to the name specified by the ServerName parameter.
Return Value
If the function succeeds, the return value is NERR_Success. Note that NetServerComputerNameAdd succeeds if the emulated server name specified is added to at least one transport.
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_PARAMETERThe specified parameter is invalid.
ERROR_NOT_ENOUGH_MEMORYInsufficient memory is available.

Remarks
Only members of the Administrators or Server Operators local group can successfully execute the NetServerComputerNameAdd function.
The server specified by the ServerName parameter continues to support all names it was supporting, and additionally begins to support new names supplied by successful calls to the NetServerComputerNameAdd function.
Name emulation that results from a call to NetServerComputerNameAdd ceases when the server reboots or restarts. To discontinue name emulation set by a previous call to NetServerComputerNameAdd without restarting or rebooting, you can call the NetServerComputerNameDel function.
The NetServerComputerNameAdd function is typically used when a system administrator replaces a server, but wants to keep the conversion transparent to users.
Examples
Following is an example of a call to the NetServerComputerNameAdd function requesting that \\\\Server1 also respond to requests for \\\\Server2.
NetServerComputerNameAdd (Server1, NULL, Server2);
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 Functions
NetServerTransportEnum
NetServerTransportAdd
NetServerTransportAddEx
NetServerComputerNameDel
Send comments about this topic to Microsoft
Build date: 8/13/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa370620(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:30:37