网站首页  词典首页

请输入您要查询的函数:

 

术语 setcomputername
释义 SetComputerName
语法:
C++
BOOL WINAPI SetComputerName(
__in LPCTSTR lpComputerName
);
SetComputerName功能
设置为本地计算机的名称新的NetBIOS。该名称是存储在注册表中的名称更改生效在下次用户重新启动计算机。
如果本地计算机是一个群集节点,SetComputerName套NetBIOS名称的本地计算机,而不是群集的虚拟服务器。
要设置DNS主机名或DNS域名,调用SetComputerNameEx功能。
参数
lpComputerName [in]
计算机的名称,会影响下一次启动计算机。该名称必须不长于MAX_COMPUTERNAME_LENGTH字符。
标准字符集包括字母,数字和符号如下:! @#$%^&')(。 - _()?。如果此参数包含一个或多个字符之外的标准字符集是,SetComputerName返回ERROR_INVALID_PARAMETER。
返回值
如果函数成功,返回值是一个非零值。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
应用此功能必须具有管理员权限。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesSetComputerNameW(Unicode)和SetComputerNameA(ANSI)的
参见
计算机名称
GetComputerName
GetComputerNameEx
SetComputerNameEx
系统信息功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetComputerName Function
Sets a new NetBIOS name for the local computer. The name is stored in the registry and the name change takes effect the next time the user restarts the computer.
If the local computer is a node in a cluster, SetComputerName sets NetBIOS name of the local computer, not that of the cluster virtual server.
To set the DNS host name or the DNS domain name, call the SetComputerNameEx function.
Syntax
C++
BOOL WINAPI SetComputerName(
__in LPCTSTR lpComputerName
);
Parameters
lpComputerName [in]
The computer name that will take effect the next time the computer is started. The name must not be longer than MAX_COMPUTERNAME_LENGTH characters.
The standard character set includes letters, numbers, and the following symbols: ! @ # $ % ^ & ' ) ( . - _ { } ~ . If this parameter contains one or more characters that are outside the standard character set, SetComputerName returns ERROR_INVALID_PARAMETER.
Return Value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
Applications using this function must have administrator rights.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesSetComputerNameW (Unicode) and SetComputerNameA (ANSI)
See Also
Computer Names
GetComputerName
GetComputerNameEx
SetComputerNameEx
System Information Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724930(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:19:53