IWbemLocator interface (wbemcli.h)

Use the IWbemLocator interface to obtain the initial namespace pointer to the IWbemServices interface for WMI on a specific host computer. You can access Windows Management itself using the IWbemServices pointer, which is returned by the IWbemLocator::ConnectServer method.

A client or provider that requires Windows Management services first obtains a pointer to the locator using CoCreateInstance or CoCreateInstanceEx, as specified in the COM documentation in the Microsoft Windows Software Development Kit (SDK). The IWbemLocator object is always an in-process COM server. The interface pointer to the desired namespace on the desired target computer is then obtained through the IWbemLocator::ConnectServer method, which is the only method on this interface.

Inheritance

The IWbemLocator interface inherits from the IUnknown interface. IWbemLocator also has these types of members:

Methods

The IWbemLocator interface has these methods.

 
IWbemLocator::ConnectServer

The IWbemLocator::ConnectServer method creates a connection through DCOM to a WMI namespace on the computer specified in the strNetworkResource parameter.

Requirements

   
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)