GlobalCatalog.GetGlobalCatalog(DirectoryContext) 方法
定义
检索指定上下文的 GlobalCatalog 对象。Retrieves a GlobalCatalog object for the specified context.
public:
static System::DirectoryServices::ActiveDirectory::GlobalCatalog ^ GetGlobalCatalog(System::DirectoryServices::ActiveDirectory::DirectoryContext ^ context);
public static System.DirectoryServices.ActiveDirectory.GlobalCatalog GetGlobalCatalog (System.DirectoryServices.ActiveDirectory.DirectoryContext context);
static member GetGlobalCatalog : System.DirectoryServices.ActiveDirectory.DirectoryContext -> System.DirectoryServices.ActiveDirectory.GlobalCatalog
Public Shared Function GetGlobalCatalog (context As DirectoryContext) As GlobalCatalog
参数
- context
- DirectoryContext
一个 DirectoryContext 对象,它包含用于检索该对象的目标和凭据。An DirectoryContext object that contains the target and credentials to use to retrieve the object. 上下文的目标必须是域控制器。The target of the context must be a domain controller.
返回
一个 GlobalCatalog 对象,它表示找到的全局目录服务器。An GlobalCatalog object that represents the global catalog server that was found.
例外
未能建立与 context 中指定目标的连接。A connection to the target specified in context could not be made.
context 为 null。context is null.
context 无效。context is not valid.