获取工作站或服务器上的域名
有些系统没有配置域名,或者可能有domain.local 形式的域名;但它们位于一个域内。
有没有办法获取这些系统所属的域?
我已经尝试使用经典 API:
NetWkstaGetInfo() DnsQueryConfig()
和许多其他...
代码值得赞赏。
Some systems don't have a domain name configured or they might have something in the form of domain.local; yet they are located within a domain.
Is there a way to get the domain these system belong to?
I already tried using the classic APIs:
NetWkstaGetInfo()
DnsQueryConfig()
and many others...
Code is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 GetComputerNameEx()
Try GetComputerNameEx()
getdomainname()
抱歉,刚刚注意到windows 标签,请参阅网络功能列表
getdomainname()
Sorry just noticed the windows tag, see list of network functions