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.
The IWbemLocator interface inherits from the IUnknown interface. IWbemLocator also has these types of members:
The IWbemLocator interface has these methods.
The IWbemLocator::ConnectServer method creates a connection through DCOM to a WMI namespace on the computer specified in the strNetworkResource parameter.
|Minimum supported client
|Minimum supported server
|Windows Server 2008
|wbemcli.h (include Wbemidl.h)