aboutsummaryrefslogtreecommitdiff
path: root/src/win32/WMIInterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32/WMIInterface.h')
-rw-r--r--src/win32/WMIInterface.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/win32/WMIInterface.h b/src/win32/WMIInterface.h
new file mode 100644
index 0000000000..c62c4d4aa8
--- /dev/null
+++ b/src/win32/WMIInterface.h
@@ -0,0 +1,54 @@
+#pragma once
+
+/*
+ * Copyright (C) 2005-2013 Team XBMC
+ * http://xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <Wbemidl.h>
+#pragma comment(lib, "wbemuuid.lib")
+#pragma comment(lib, "comsuppw.lib")
+
+
+class CWIN32Wmi
+{
+public:
+ CWIN32Wmi(void);
+ virtual ~CWIN32Wmi(void);
+
+ bool Connect();
+ void Release();
+ void testquery();
+
+ std::vector<CStdString> GetWMIStrVector(CStdString& strQuery, CStdStringW& strProperty);
+ CStdString GetWMIString(CStdString& strQuery, CStdStringW& strProperty);
+
+
+
+private:
+
+ HRESULT hres;
+ IWbemLocator *pLoc;
+ IWbemServices *pSvc;
+ IEnumWbemClassObject *pEnumerator;
+ IWbemClassObject *pclsObj;
+
+ bool bconnected;
+
+
+};