forked from 0ad/0ad
janwas
805736cb8f
simplify detect code by adding support for WMI (the "proper" way to do things) wutsname: fix incorrect reporting of windows version ps/Util: add note on exception that is raised on Wow64 (Windows bug) This was SVN commit r5213.
30 lines
976 B
C++
30 lines
976 B
C++
/**
|
|
* =========================================================================
|
|
* File : wmi.h
|
|
* Project : 0 A.D.
|
|
* Description : wrapper for Windows Management Instrumentation
|
|
* =========================================================================
|
|
*/
|
|
|
|
// license: GPL; see lib/license.txt
|
|
|
|
#ifndef INCLUDED_WMI
|
|
#define INCLUDED_WMI
|
|
|
|
// note: we expose the VARIANT value as returned by WMI. this allows other
|
|
// modules to use the values they want directly, rather than forcing
|
|
// everything to be converted to/parsed from strings. it does drag in
|
|
// OLE headers, but this module is entirely Windows-specific anyway.
|
|
#define _WIN32_DCOM
|
|
#include "win.h"
|
|
#include <comdef.h> // VARIANT
|
|
typedef std::map<std::wstring, VARIANT> WmiMap;
|
|
|
|
/**
|
|
* return a map of name/value pairs of the WMI class members.
|
|
* @return LibError
|
|
**/
|
|
extern LibError wmi_GetClass(const char* className, WmiMap& wmiMap);
|
|
|
|
#endif // #ifndef INCLUDED_WMI
|