SetComputerNameEx怎么用呀?急!!

jianxuan 2005-08-12 09:01:27
我在使用SetComputerNameEx函数时总是报函数未定义,差什么东西吗?我是使用win2000p和vc6的dlg应用程序呀。
另外,我使用SetComputerName改变计算机名称的时候,过程没有问题,可就是结果跟没有改变一样,重启也没有效果,为什么呀?
...全文
225 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
gordonwg 2005-10-18
  • 打赏
  • 举报
回复
学习
lixiaosan 2005-08-12
  • 打赏
  • 举报
回复
你把platform sdk安装后再试试

Remarks

SetComputerNameEx can set the Computer Name (the first label of the full DNS name) or the primary DNS suffix of the local computer. It cannot set a fully-qualified DNS name in one call.

If the local computer is a node in a cluster, SetComputerNameEx sets NetBIOS or DNS name of the local computer, not that of the cluster virtual server.

The process that calls the SetComputerNameEx function must have administrator privileges on the local computer.

To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the SDK Headers.
DentistryDoctor 2005-08-12
  • 打赏
  • 举报
回复
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x500
#endif

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧