如何以编程方式确定Windows计算机是否是域的成员? [英] How do you programmatically determine whether a Windows computer is a member of a domain?

查看:198
本文介绍了如何以编程方式确定Windows计算机是否是域的成员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种方法来确定运行我的程序的计算机是否加入到任何域。它是什么特定领域并不重要,它是否连接到任何东西。我正在使用vc ++编写Win32 API。

I need a way to determine whether the computer running my program is joined to any domain. It doesn't matter what specific domain it is part of, just whether it is connected to anything. I'm coding in vc++ against the Win32 API.

推荐答案

直接从Microsoft:

Straight from Microsoft:

如何确定Windows NT / Windows 2000计算机是否是域成员

此方法使用Windows API。从文章摘要:

This approach uses the Windows API. From the article summary:


本文介绍如何
确定一台计算机是
运行Windows NT 4.0或Windows 2000
是域的成员,是工作组的成员
,或是使用本地安全性
权限API的独立
计算机。

This article describes how to determine if a computer that is running Windows NT 4.0 or Windows 2000 is a member of a domain, is a member of a workgroup, or is a stand-alone computer using the Local Security Authority APIs.

本文还提供了一个小程序的示例代码,该程序输出程序运行的计算机是否是域的一部分,即工作组的一部分,或独立计算机。

The article also provides sample code for a small program that outputs whether the computer the program is running on is part of a domain, part of a workgroup, or a standalone computer.

这篇关于如何以编程方式确定Windows计算机是否是域的成员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆