勇芳软件工作室.汉化:  Windows Management Instrumentation > COM API for WMI > Interfaces >

IWbemLocator

Previous pageReturn to chapter overviewNext page

使用IWbemLocator接口获取特定主机上WMI的IWbemServices接口的初始命名空间指针。您可以使用IWbemServices方法返回的IWbemServices指针访问Windows管理本身。

 

需要Windows管理服务的客户端或提供者首先使用Microsoft Windows软件开发工具包(SDK)中的COM文档中指定的CoCreateInstanceCoCreateInstanceEx获取指向定位器的指针。IWbemLocator对象始终是一个进程内COM服务器。然后通过IWbemLocator.ConnectServer方法获得所需目标计算机上所需命名空间的接口指针,该方法是此接口上唯一的方法。

 

方法

 

IWbemLocator界面继承了IUnknown接口的方法。

 

此外,IWbemLocator定义了以下方法。

 

方法

描述

ConnectServer

连接到指定计算机上的Windows管理。

 

要求

 

客户

需要Windows Vista,Windows XP,Windows 2000 Professional,Windows NT Workstation 4.0 SP4及更高版本,Windows Me,Windows 98或Windows 95。

服务器

需要Windows Server 2008,Windows Server 2003,Windows 2000 Server或Windows NT Server 4.0 SP4及更高版本。

在Wbemcli.inc中声明。

DLL

需要Wbemcore.dll。

需要Wbemupgd.dll。