WMI Library
|
A connection to the WMI provider on a host. More...
#include <Connection.hpp>
Public Member Functions | |
Connection () | |
Default constructor. | |
~Connection () | |
Destructor. | |
bool | isOpen () const |
Query if the connection is open. | |
void | open () |
Open a connection to the current host. | |
void | open (const tstring &host, const tstring &login, const tstring &password) |
Open a connection to a specific host. | |
void | open (const tstring &host, const tstring &login, const tstring &password, const tstring &nmspace) |
Open a connection to a specific host and namespace. | |
void | close () |
Close the connection. | |
ObjectIterator | execQuery (const tchar *query) |
Execute the query. | |
Static Public Attributes | |
static const tstring | LOCALHOST = TXT(".") |
The local computer path. | |
static const tstring | DEFAULT_NAMESPACE = TXT("\\root\\cimv2") |
The default namespace. | |
Private Types | |
typedef WCL::ComPtr< IWbemLocator > | IWbemLocatorPtr |
The WMI Locator COM interface. | |
typedef WCL::ComPtr < IWbemServices > | IWbemServicesPtr |
The WMI Conection COM interface. | |
typedef WCL::ComPtr < IEnumWbemClassObject > | IEnumWbemClassObjectPtr |
The WMI query result type. | |
Private Attributes | |
IWbemLocatorPtr | m_locator |
The underlyng WMI locator. | |
IWbemServicesPtr | m_services |
The underlying WMI connection. |
A connection to the WMI provider on a host.
typedef WCL::ComPtr<IWbemLocator> WMI::Connection::IWbemLocatorPtr [private] |
The WMI Locator COM interface.
typedef WCL::ComPtr<IWbemServices> WMI::Connection::IWbemServicesPtr [private] |
The WMI Conection COM interface.
typedef WCL::ComPtr<IEnumWbemClassObject> WMI::Connection::IEnumWbemClassObjectPtr [private] |
The WMI query result type.
Default constructor.
Destructor.
bool WMI::Connection::isOpen | ( | ) | const |
Query if the connection is open.
void WMI::Connection::open | ( | ) |
Open a connection to the current host.
void WMI::Connection::open | ( | const tstring & | host, |
const tstring & | login, | ||
const tstring & | password | ||
) |
Open a connection to a specific host.
void WMI::Connection::open | ( | const tstring & | host, |
const tstring & | login, | ||
const tstring & | password, | ||
const tstring & | nmspace | ||
) |
Open a connection to a specific host and namespace.
void WMI::Connection::close | ( | ) |
Close the connection.
ObjectIterator WMI::Connection::execQuery | ( | const tchar * | query | ) |
Execute the query.
const tstring WMI::Connection::LOCALHOST = TXT(".") [static] |
The local computer path.
const tstring WMI::Connection::DEFAULT_NAMESPACE = TXT("\\root\\cimv2") [static] |
The default namespace.
IWbemLocatorPtr WMI::Connection::m_locator [private] |
The underlyng WMI locator.
IWbemServicesPtr WMI::Connection::m_services [private] |
The underlying WMI connection.