How do you programmatically determine whether a Windows computer is a member of a domain?(如何以编程方式确定 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.
推荐答案
直接来自微软:
如何确定 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 计算机是否是域的成员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何以编程方式确定 Windows 计算机是否是域的成员?
				
        
 
            
        基础教程推荐
- 如何通过C程序打开命令提示符Cmd 2022-12-09
 - 这个宏可以转换成函数吗? 2022-01-01
 - 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
 - 常量变量在标题中不起作用 2021-01-01
 - 在 C++ 中计算滚动/移动平均值 2021-01-01
 - 我有静态或动态 boost 库吗? 2021-01-01
 - C++结构和函数声明。为什么它不能编译? 2022-11-07
 - 如何在 C++ 中初始化静态常量成员? 2022-01-01
 - 如何检查GTK+3.0中的小部件类型? 2022-11-30
 - 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				