* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "wbemprox_private.h"
+#define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+
+#include "config.h"
+#include <stdarg.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
-#include <winuser.h>
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#ifdef __MINGW32__
+# include "winsock2.h"
+# include "ws2tcpip.h"
+# define WS_AF_UNSPEC AF_UNSPEC
+# define WS_NI_MAXHOST NI_MAXHOST
+# define WS_NI_NAMEREQD NI_NAMEREQD
+#else
+# define USE_WS_PREFIX
+# include "winsock2.h"
+# include "ws2tcpip.h"
+#endif
+#include "initguid.h"
+#include "wbemcli.h"
+#include "wbemprov.h"
+#include "iphlpapi.h"
+#include "tlhelp32.h"
+#ifndef __REACTOS__
+#include "d3d10.h"
+#endif
+#include "winternl.h"
+#include "winioctl.h"
+#include "winsvc.h"
+#include "winver.h"
+#include "sddl.h"
+#include "ntsecapi.h"
+#ifdef __REACTOS__
#include <wingdi.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <iphlpapi.h>
-#include <tlhelp32.h>
-#include <winternl.h>
-#include <winioctl.h>
-#include <winver.h>
-#include <ntsecapi.h>
-#include <winspool.h>
-#include <sddl.h>
+#endif
+#include "winspool.h"
+
+#include "wine/debug.h"
+#include "wbemprox_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
static const WCHAR class_baseboardW[] =
{'W','i','n','3','2','_','B','a','s','e','B','o','a','r','d',0};
{'A','d','a','p','t','e','r','T','y','p','e',0};
static const WCHAR prop_addresswidthW[] =
{'A','d','d','r','e','s','s','W','i','d','t','h',0};
+static const WCHAR prop_architectureW[] =
+ {'A','r','c','h','i','t','e','c','t','u','r','e',0};
static const WCHAR prop_attributesW[] =
{'A','t','t','r','i','b','u','t','e','s',0};
#ifndef __REACTOS__
{'C','o','d','e','S','e','t',0};
static const WCHAR prop_commandlineW[] =
{'C','o','m','m','a','n','d','L','i','n','e',0};
+static const WCHAR prop_configmanagererrorcodeW[] =
+ {'C','o','n','f','i','g','M','a','n','a','g','e','r','E','r','r','o','r','C','o','d','e',0};
static const WCHAR prop_countrycodeW[] =
{'C','o','u','n','t','r','y','C','o','d','e',0};
static const WCHAR prop_cpustatusW[] =
{'D','o','m','a','i','n','R','o','l','e',0};
static const WCHAR prop_driveW[] =
{'D','r','i','v','e',0};
+static const WCHAR prop_driverdateW[] =
+ {'D','r','i','v','e','r','D','a','t','e',0};
static const WCHAR prop_drivernameW[] =
{'D','r','i','v','e','r','N','a','m','e',0};
#ifndef __REACTOS__
{'F','l','a','v','o','r',0};
static const WCHAR prop_freespaceW[] =
{'F','r','e','e','S','p','a','c','e',0};
+static const WCHAR prop_freephysicalmemoryW[] =
+ {'F','r','e','e','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
static const WCHAR prop_handleW[] =
{'H','a','n','d','l','e',0};
static const WCHAR prop_horizontalresolutionW[] =
{'I','n','d','e','x',0};
static const WCHAR prop_installdateW[] =
{'I','n','s','t','a','l','l','D','a','t','e',0};
+static const WCHAR prop_installeddisplaydriversW[]=
+ {'I','n','s','t','a','l','l','e','d','D','i','s','p','l','a','y','D','r','i','v','e','r','s',0};
static const WCHAR prop_interfaceindexW[] =
{'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0};
static const WCHAR prop_interfacetypeW[] =
{'I','P','E','n','a','b','l','e','d',0};
static const WCHAR prop_lastbootuptimeW[] =
{'L','a','s','t','B','o','o','t','U','p','T','i','m','e',0};
+static const WCHAR prop_levelW[] =
+ {'L','e','v','e','l',0};
static const WCHAR prop_localW[] =
{'L','o','c','a','l',0};
static const WCHAR prop_localdatetimeW[] =
{'L','o','c','a','l','D','a','t','e','T','i','m','e',0};
static const WCHAR prop_localeW[] =
{'L','o','c','a','l','e',0};
+static const WCHAR prop_locationW[] =
+ {'L','o','c','a','t','i','o','n',0};
static const WCHAR prop_lockpresentW[] =
{'L','o','c','k','P','r','e','s','e','n','t',0};
static const WCHAR prop_macaddressW[] =
{'P','i','x','e','l','s','P','e','r','X','L','o','g','i','c','a','l','I','n','c','h',0};
static const WCHAR prop_pnpdeviceidW[] =
{'P','N','P','D','e','v','i','c','e','I','D',0};
+static const WCHAR prop_portnameW[] =
+ {'P','o','r','t','N','a','m','e',0};
static const WCHAR prop_pprocessidW[] =
{'P','a','r','e','n','t','P','r','o','c','e','s','s','I','D',0};
static const WCHAR prop_primaryW[] =
{'R','e','f','e','r','e','n','c','e','d','D','o','m','a','i','n','N','a','m','e',0};
static const WCHAR prop_releasedateW[] =
{'R','e','l','e','a','s','e','D','a','t','e',0};
+static const WCHAR prop_revisionW[] =
+ {'R','e','v','i','s','i','o','n',0};
static const WCHAR prop_serialnumberW[] =
{'S','e','r','i','a','l','N','u','m','b','e','r',0};
static const WCHAR prop_servicepackmajorW[] =
{'S','e','r','v','i','c','e','T','y','p','e',0};
static const WCHAR prop_settingidW[] =
{'S','e','t','t','i','n','g','I','D',0};
+static const WCHAR prop_skunumberW[] =
+ {'S','K','U','N','u','m','b','e','r',0};
static const WCHAR prop_smbiosbiosversionW[] =
{'S','M','B','I','O','S','B','I','O','S','V','e','r','s','i','o','n',0};
+static const WCHAR prop_smbiosmajorversionW[] =
+ {'S','M','B','I','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0};
+static const WCHAR prop_smbiosminorversionW[] =
+ {'S','M','B','I','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_startmodeW[] =
{'S','t','a','r','t','M','o','d','e',0};
static const WCHAR prop_sidW[] =
{'S','t','a','r','t','i','n','g','O','f','f','s','e','t',0};
static const WCHAR prop_stateW[] =
{'S','t','a','t','e',0};
+static const WCHAR prop_statusW[] =
+ {'S','t','a','t','u','s',0};
static const WCHAR prop_statusinfoW[] =
{'S','t','a','t','u','s','I','n','f','o',0};
static const WCHAR prop_strvalueW[] =
{'U','U','I','D',0};
static const WCHAR prop_varianttypeW[] =
{'V','a','r','i','a','n','t','T','y','p','e',0};
+static const WCHAR prop_vendorW[] =
+ {'V','e','n','d','o','r',0};
static const WCHAR prop_versionW[] =
{'V','e','r','s','i','o','n',0};
#ifndef __REACTOS__
{ prop_releasedateW, CIM_DATETIME },
{ prop_serialnumberW, CIM_STRING },
{ prop_smbiosbiosversionW, CIM_STRING },
+ { prop_smbiosmajorversionW, CIM_UINT16, VT_I4 },
+ { prop_smbiosminorversionW, CIM_UINT16, VT_I4 },
{ prop_versionW, CIM_STRING|COL_FLAG_KEY }
};
static const struct column col_cdromdrive[] =
static const struct column col_compsysproduct[] =
{
{ prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY },
- { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { prop_nameW, CIM_STRING|COL_FLAG_KEY },
+ { prop_skunumberW, CIM_STRING },
+ { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_vendorW, CIM_STRING },
+ { prop_versionW, CIM_STRING|COL_FLAG_KEY }
};
static const struct column col_datafile[] =
{
{ prop_codesetW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_countrycodeW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_csdversionW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_freephysicalmemoryW, CIM_UINT64 },
{ prop_installdateW, CIM_DATETIME },
{ prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
{ prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
static const struct column col_printer[] =
{
{ prop_attributesW, CIM_UINT32 },
+ { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
{ prop_drivernameW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_horizontalresolutionW, CIM_UINT32 },
{ prop_localW, CIM_BOOLEAN },
+ { prop_locationW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_networkW, CIM_BOOLEAN }
+ { prop_networkW, CIM_BOOLEAN },
+ { prop_portnameW, CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_process[] =
{
static const struct column col_processor[] =
{
{ prop_addresswidthW, CIM_UINT16, VT_I4 },
+ { prop_architectureW, CIM_UINT16, VT_I4 },
{ prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_cpustatusW, CIM_UINT16 },
{ prop_currentclockspeedW, CIM_UINT32, VT_I4 },
{ prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
{ prop_familyW, CIM_UINT16, VT_I4 },
+ { prop_levelW, CIM_UINT16, VT_I4 },
{ prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_maxclockspeedW, CIM_UINT32, VT_I4 },
{ prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_numlogicalprocessorsW, CIM_UINT32, VT_I4 },
{ prop_processoridW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_processortypeW, CIM_UINT16, VT_I4 },
+ { prop_revisionW, CIM_UINT16, VT_I4 },
{ prop_uniqueidW, CIM_STRING },
{ prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC }
};
#ifndef __REACTOS__
static const struct column col_videocontroller[] =
{
- { prop_adapterdactypeW, CIM_STRING },
- { prop_adapterramW, CIM_UINT32, VT_I4 },
- { prop_availabilityW, CIM_UINT16 },
- { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_currentbitsperpixelW, CIM_UINT32, VT_I4 },
- { prop_currenthorizontalresW, CIM_UINT32, VT_I4 },
- { prop_currentrefreshrateW, CIM_UINT32, VT_I4 },
- { prop_currentscanmodeW, CIM_UINT16, VT_I4 },
- { prop_currentverticalresW, CIM_UINT32, VT_I4 },
- { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_deviceidW, CIM_STRING|COL_FLAG_KEY },
- { prop_driverversionW, CIM_STRING },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_videoarchitectureW, CIM_UINT16, VT_I4 },
- { prop_videomemorytypeW, CIM_UINT16, VT_I4 },
- { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { prop_adapterdactypeW, CIM_STRING },
+ { prop_adapterramW, CIM_UINT32, VT_I4 },
+ { prop_availabilityW, CIM_UINT16 },
+ { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_configmanagererrorcodeW, CIM_UINT32, VT_I4 },
+ { prop_currentbitsperpixelW, CIM_UINT32, VT_I4 },
+ { prop_currenthorizontalresW, CIM_UINT32, VT_I4 },
+ { prop_currentrefreshrateW, CIM_UINT32, VT_I4 },
+ { prop_currentscanmodeW, CIM_UINT16, VT_I4 },
+ { prop_currentverticalresW, CIM_UINT32, VT_I4 },
+ { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_deviceidW, CIM_STRING|COL_FLAG_KEY },
+ { prop_driverdateW, CIM_DATETIME },
+ { prop_driverversionW, CIM_STRING },
+ { prop_installeddisplaydriversW,CIM_STRING },
+ { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_statusW, CIM_STRING },
+ { prop_videoarchitectureW, CIM_UINT16, VT_I4 },
+ { prop_videomemorytypeW, CIM_UINT16, VT_I4 },
+ { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC },
};
#endif
{'W','i','n','e',0};
static const WCHAR compsysproduct_identifyingnumberW[] =
{'0',0};
+static const WCHAR compsysproduct_nameW[] =
+ {'W','i','n','e',0};
static const WCHAR compsysproduct_uuidW[] =
{'d','e','a','d','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-','d','e','a','d','-',
'd','e','a','d','d','e','a','d','d','e','a','d',0};
+static const WCHAR compsysproduct_vendorW[] =
+ {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
+static const WCHAR compsysproduct_versionW[] =
+ {'1','.','0',0};
static const WCHAR diskdrive_interfacetypeW[] =
{'I','D','E',0};
static const WCHAR diskdrive_manufacturerW[] =
{'I','n','t','e','g','r','a','t','e','d',' ','R','A','M','D','A','C',0};
static const WCHAR videocontroller_deviceidW[] =
{'V','i','d','e','o','C','o','n','t','r','o','l','l','e','r','1',0};
+static const WCHAR videocontroller_driverdateW[] =
+ {'2','0','1','7','0','1','0','1','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0};
static const WCHAR videocontroller_driverversionW[] =
{'1','.','0',0};
+static const WCHAR videocontroller_statusW[] =
+ {'O','K',0};
#endif
#include "pshpack1.h"
const WCHAR *releasedate;
const WCHAR *serialnumber;
const WCHAR *smbiosbiosversion;
+ UINT16 smbiosmajorversion;
+ UINT16 smbiosminorversion;
const WCHAR *version;
};
struct record_cdromdrive
struct record_computersystemproduct
{
const WCHAR *identifyingnumber;
+ const WCHAR *name;
+ const WCHAR *skunumber;
const WCHAR *uuid;
+ const WCHAR *vendor;
+ const WCHAR *version;
};
struct record_datafile
{
const WCHAR *codeset;
const WCHAR *countrycode;
const WCHAR *csdversion;
+ UINT64 freephysicalmemory;
const WCHAR *installdate;
const WCHAR *lastbootuptime;
const WCHAR *localdatetime;
struct record_printer
{
UINT32 attributes;
+ const WCHAR *device_id;
const WCHAR *drivername;
UINT32 horizontalresolution;
int local;
+ const WCHAR *location;
const WCHAR *name;
int network;
+ const WCHAR *portname;
};
struct record_process
{
struct record_processor
{
UINT16 addresswidth;
+ UINT16 architecture;
const WCHAR *caption;
UINT16 cpu_status;
UINT32 currentclockspeed;
const WCHAR *description;
const WCHAR *device_id;
UINT16 family;
+ UINT16 level;
const WCHAR *manufacturer;
UINT32 maxclockspeed;
const WCHAR *name;
UINT32 num_logical_processors;
const WCHAR *processor_id;
UINT16 processortype;
+ UINT16 revision;
const WCHAR *unique_id;
const WCHAR *version;
};
UINT32 adapter_ram;
UINT16 availability;
const WCHAR *caption;
+ UINT32 config_errorcode;
UINT32 current_bitsperpixel;
UINT32 current_horizontalres;
UINT32 current_refreshrate;
UINT32 current_verticalres;
const WCHAR *description;
const WCHAR *device_id;
+ const WCHAR *driverdate;
const WCHAR *driverversion;
+ const WCHAR *installeddriver;
const WCHAR *name;
const WCHAR *pnpdevice_id;
+ const WCHAR *status;
UINT16 videoarchitecture;
UINT16 videomemorytype;
const WCHAR *videomodedescription;
static const struct record_bios data_bios[] =
{
{ bios_descriptionW, NULL, bios_manufacturerW, bios_nameW, bios_releasedateW, bios_serialnumberW,
- bios_smbiosbiosversionW, bios_versionW }
+ bios_smbiosbiosversionW, 1, 0, bios_versionW }
};
static const struct record_param data_param[] =
{
return status.ullTotalPhys;
}
+static UINT64 get_available_physical_memory(void)
+{
+ MEMORYSTATUSEX status;
+
+ status.dwLength = sizeof(status);
+ if (!GlobalMemoryStatusEx( &status )) return 1024 * 1024 * 1024;
+ return status.ullAvailPhys;
+}
+
static WCHAR *get_computername(void)
{
WCHAR *ret;
rec = (struct record_computersystemproduct *)table->data;
rec->identifyingnumber = compsysproduct_identifyingnumberW;
+ rec->name = compsysproduct_nameW;
+ rec->skunumber = NULL;
rec->uuid = get_compsysproduct_uuid();
+ rec->vendor = compsysproduct_vendorW;
+ rec->version = compsysproduct_versionW;
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
static enum fill_status fill_printer( struct table *table, const struct expr *cond )
{
+ static const WCHAR fmtW[] = {'P','r','i','n','t','e','r','%','d',0};
struct record_printer *rec;
enum fill_status status = FILL_STATUS_UNFILTERED;
PRINTER_INFO_2W *info;
DWORD i, offset = 0, count = 0, size = 0, num_rows = 0;
+ WCHAR id[20];
EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &size, &count );
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) return FILL_STATUS_FAILED;
{
rec = (struct record_printer *)(table->data + offset);
rec->attributes = info[i].Attributes;
+ sprintfW( id, fmtW, i );
+ rec->device_id = heap_strdupW( id );
rec->drivername = heap_strdupW( info[i].pDriverName );
rec->horizontalresolution = info[i].pDevMode->u1.s1.dmPrintQuality;
rec->local = -1;
+ rec->location = heap_strdupW( info[i].pLocation );
rec->name = heap_strdupW( info[i].pPrinterName );
rec->network = 0;
+ rec->portname = heap_strdupW( info[i].pPortName );
if (!match_row( table, i, cond, &status ))
{
free_row_values( table, i );
do_cpuid( 1, regs );
sprintfW( version, fmtW, (regs[0] & (15 << 4)) >> 4, regs[0] & 15 );
}
+static UINT16 get_processor_revision(void)
+{
+ unsigned int regs[4] = {0, 0, 0, 0};
+ do_cpuid( 1, regs );
+ return regs[0];
+}
static void get_processor_id( WCHAR *processor_id )
{
static const WCHAR fmtW[] = {'%','0','8','X','%','0','8','X',0};
{
rec = (struct record_processor *)(table->data + offset);
rec->addresswidth = get_osarchitecture() == os_32bitW ? 32 : 64;
+ rec->architecture = get_osarchitecture() == os_32bitW ? 0 : 9;
rec->caption = heap_strdupW( caption );
rec->cpu_status = 1; /* CPU Enabled */
rec->currentclockspeed = get_processor_currentclockspeed( i );
sprintfW( device_id, fmtW, i );
rec->device_id = heap_strdupW( device_id );
rec->family = 2; /* Unknown */
+ rec->level = 15;
rec->manufacturer = heap_strdupW( manufacturer );
rec->maxclockspeed = get_processor_maxclockspeed( i );
rec->name = heap_strdupW( name );
rec->num_logical_processors = num_logical_processors;
rec->processor_id = heap_strdupW( processor_id );
rec->processortype = 3; /* central processor */
+ rec->revision = get_processor_revision();
rec->unique_id = NULL;
rec->version = heap_strdupW( version );
if (!match_row( table, i, cond, &status ))
rec->codeset = get_codeset();
rec->countrycode = get_countrycode();
rec->csdversion = ver.szCSDVersion[0] ? heap_strdupW( ver.szCSDVersion ) : NULL;
+ rec->freephysicalmemory = get_available_physical_memory() / 1024;
rec->installdate = os_installdateW;
rec->lastbootuptime = get_lastbootuptime();
rec->localdatetime = get_localdatetime();
return ret;
}
+#define HW_VENDOR_AMD 0x1002
+#define HW_VENDOR_NVIDIA 0x10de
+#define HW_VENDOR_VMWARE 0x15ad
+#define HW_VENDOR_INTEL 0x8086
+
+static const WCHAR *get_installeddriver( UINT vendorid )
+{
+ static const WCHAR driver_amdW[] = {'a','t','i','c','f','x','3','2','.','d','l','l',0};
+ static const WCHAR driver_intelW[] = {'i','g','d','u','m','d','i','m','3','2','.','d','l','l',0};
+ static const WCHAR driver_nvidiaW[] = {'n','v','d','3','d','u','m','.','d','l','l',0};
+ static const WCHAR driver_wineW[] = {'w','i','n','e','.','d','l','l',0};
+
+ /* FIXME: wined3d has a better table, but we can not access this information through dxgi */
+
+ if (vendorid == HW_VENDOR_AMD)
+ return driver_amdW;
+ else if (vendorid == HW_VENDOR_NVIDIA)
+ return driver_nvidiaW;
+ else if (vendorid == HW_VENDOR_INTEL)
+ return driver_intelW;
+ return driver_wineW;
+}
+
static enum fill_status fill_videocontroller( struct table *table, const struct expr *cond )
{
static const WCHAR fmtW[] = {'%','u',' ','x',' ','%','u',' ','x',' ','%','I','6','4','u',' ','c','o','l','o','r','s',0};
rec->adapter_dactype = videocontroller_dactypeW;
rec->adapter_ram = vidmem;
rec->availability = 3; /* Running or Full Power */
+ rec->config_errorcode = 0; /* no error */
rec->caption = heap_strdupW( name );
rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres );
rec->current_horizontalres = hres;
rec->current_verticalres = vres;
rec->description = heap_strdupW( name );
rec->device_id = videocontroller_deviceidW;
+ rec->driverdate = videocontroller_driverdateW;
rec->driverversion = videocontroller_driverversionW;
+ rec->installeddriver = get_installeddriver( desc.VendorId );
rec->name = heap_strdupW( name );
rec->pnpdevice_id = get_pnpdeviceid( &desc );
+ rec->status = videocontroller_statusW;
rec->videoarchitecture = 2; /* Unknown */
rec->videomemorytype = 2; /* Unknown */
wsprintfW( mode, fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel );
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wbemcli.h"
#include "wbemprox_private.h"
+#include "wine/list.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
+
struct parser
{
const WCHAR *cmd;
result = current_view
-#line 247 "wql.tab.c" /* yacc.c:339 */
+#line 259 "wql.tab.c" /* yacc.c:339 */
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
/* In a future release of Bison, this section will be replaced
by #include "wql.tab.h". */
-#ifndef YY_WQL_E_REACTOSSYNC3_0_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED
-# define YY_WQL_E_REACTOSSYNC3_0_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED
+#ifndef YY_WQL_E_REACTOSSYNC_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED
+# define YY_WQL_E_REACTOSSYNC_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
-#line 182 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:355 */
+#line 194 "wql.y" /* yacc.c:355 */
struct string str;
WCHAR *string;
struct expr *expr;
int integer;
-#line 328 "wql.tab.c" /* yacc.c:355 */
+#line 340 "wql.tab.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
int wql_parse (struct parser *ctx);
-#endif /* !YY_WQL_E_REACTOSSYNC3_0_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED */
+#endif /* !YY_WQL_E_REACTOSSYNC_GCC_DLL_WIN32_WBEMPROX_WQL_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
-#line 342 "wql.tab.c" /* yacc.c:358 */
+#line 354 "wql.tab.c" /* yacc.c:358 */
#ifdef short
# undef short
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 209, 209, 221, 233, 248, 249, 253, 260, 266,
- 275, 284, 291, 297, 303, 309, 315, 321, 327, 333,
- 339, 345, 351, 357, 363, 369, 375, 381, 387, 393,
- 399, 405, 411, 417, 423, 432, 441, 450, 456, 462,
- 468
+ 0, 221, 221, 233, 245, 260, 261, 265, 272, 278,
+ 287, 296, 303, 309, 315, 321, 327, 333, 339, 345,
+ 351, 357, 363, 369, 375, 381, 387, 393, 399, 405,
+ 411, 417, 423, 429, 435, 444, 453, 462, 468, 474,
+ 480
};
#endif
switch (yyn)
{
case 2:
-#line 210 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 222 "wql.y" /* yacc.c:1646 */
{
HRESULT hr;
struct parser *parser = ctx;
PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view );
}
-#line 1464 "wql.tab.c" /* yacc.c:1646 */
+#line 1476 "wql.tab.c" /* yacc.c:1646 */
break;
case 3:
-#line 222 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 234 "wql.y" /* yacc.c:1646 */
{
HRESULT hr;
struct parser *parser = ctx;
PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view );
}
-#line 1480 "wql.tab.c" /* yacc.c:1646 */
+#line 1492 "wql.tab.c" /* yacc.c:1646 */
break;
case 4:
-#line 234 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 246 "wql.y" /* yacc.c:1646 */
{
HRESULT hr;
struct parser *parser = ctx;
PARSER_BUBBLE_UP_VIEW( parser, (yyval.view), view );
}
-#line 1496 "wql.tab.c" /* yacc.c:1646 */
+#line 1508 "wql.tab.c" /* yacc.c:1646 */
break;
case 6:
-#line 250 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 262 "wql.y" /* yacc.c:1646 */
{
(yyvsp[-2].proplist)->next = (yyvsp[0].proplist);
}
-#line 1504 "wql.tab.c" /* yacc.c:1646 */
+#line 1516 "wql.tab.c" /* yacc.c:1646 */
break;
case 7:
-#line 254 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 266 "wql.y" /* yacc.c:1646 */
{
(yyval.proplist) = NULL;
}
-#line 1512 "wql.tab.c" /* yacc.c:1646 */
+#line 1524 "wql.tab.c" /* yacc.c:1646 */
break;
case 8:
-#line 261 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 273 "wql.y" /* yacc.c:1646 */
{
(yyval.proplist) = alloc_property( ctx, (yyvsp[-2].string), (yyvsp[0].string) );
if (!(yyval.proplist))
YYABORT;
}
-#line 1522 "wql.tab.c" /* yacc.c:1646 */
+#line 1534 "wql.tab.c" /* yacc.c:1646 */
break;
case 9:
-#line 267 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 279 "wql.y" /* yacc.c:1646 */
{
(yyval.proplist) = alloc_property( ctx, NULL, (yyvsp[0].string) );
if (!(yyval.proplist))
YYABORT;
}
-#line 1532 "wql.tab.c" /* yacc.c:1646 */
+#line 1544 "wql.tab.c" /* yacc.c:1646 */
break;
case 10:
-#line 276 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 288 "wql.y" /* yacc.c:1646 */
{
(yyval.string) = get_string( ctx, &(yyvsp[0].str) );
if (!(yyval.string))
YYABORT;
}
-#line 1542 "wql.tab.c" /* yacc.c:1646 */
+#line 1554 "wql.tab.c" /* yacc.c:1646 */
break;
case 11:
-#line 285 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 297 "wql.y" /* yacc.c:1646 */
{
(yyval.integer) = get_int( ctx );
}
-#line 1550 "wql.tab.c" /* yacc.c:1646 */
+#line 1562 "wql.tab.c" /* yacc.c:1646 */
break;
case 12:
-#line 292 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 304 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = (yyvsp[-1].expr);
if (!(yyval.expr))
YYABORT;
}
-#line 1560 "wql.tab.c" /* yacc.c:1646 */
+#line 1572 "wql.tab.c" /* yacc.c:1646 */
break;
case 13:
-#line 298 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 310 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_AND, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1570 "wql.tab.c" /* yacc.c:1646 */
+#line 1582 "wql.tab.c" /* yacc.c:1646 */
break;
case 14:
-#line 304 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 316 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_OR, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1580 "wql.tab.c" /* yacc.c:1646 */
+#line 1592 "wql.tab.c" /* yacc.c:1646 */
break;
case 15:
-#line 310 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 322 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOT );
if (!(yyval.expr))
YYABORT;
}
-#line 1590 "wql.tab.c" /* yacc.c:1646 */
+#line 1602 "wql.tab.c" /* yacc.c:1646 */
break;
case 16:
-#line 316 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 328 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1600 "wql.tab.c" /* yacc.c:1646 */
+#line 1612 "wql.tab.c" /* yacc.c:1646 */
break;
case 17:
-#line 322 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 334 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1610 "wql.tab.c" /* yacc.c:1646 */
+#line 1622 "wql.tab.c" /* yacc.c:1646 */
break;
case 18:
-#line 328 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 340 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1620 "wql.tab.c" /* yacc.c:1646 */
+#line 1632 "wql.tab.c" /* yacc.c:1646 */
break;
case 19:
-#line 334 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 346 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1630 "wql.tab.c" /* yacc.c:1646 */
+#line 1642 "wql.tab.c" /* yacc.c:1646 */
break;
case 20:
-#line 340 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 352 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1640 "wql.tab.c" /* yacc.c:1646 */
+#line 1652 "wql.tab.c" /* yacc.c:1646 */
break;
case 21:
-#line 346 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 358 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1650 "wql.tab.c" /* yacc.c:1646 */
+#line 1662 "wql.tab.c" /* yacc.c:1646 */
break;
case 22:
-#line 352 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 364 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1660 "wql.tab.c" /* yacc.c:1646 */
+#line 1672 "wql.tab.c" /* yacc.c:1646 */
break;
case 23:
-#line 358 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 370 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1670 "wql.tab.c" /* yacc.c:1646 */
+#line 1682 "wql.tab.c" /* yacc.c:1646 */
break;
case 24:
-#line 364 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 376 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1680 "wql.tab.c" /* yacc.c:1646 */
+#line 1692 "wql.tab.c" /* yacc.c:1646 */
break;
case 25:
-#line 370 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 382 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1690 "wql.tab.c" /* yacc.c:1646 */
+#line 1702 "wql.tab.c" /* yacc.c:1646 */
break;
case 26:
-#line 376 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 388 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1700 "wql.tab.c" /* yacc.c:1646 */
+#line 1712 "wql.tab.c" /* yacc.c:1646 */
break;
case 27:
-#line 382 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 394 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1710 "wql.tab.c" /* yacc.c:1646 */
+#line 1722 "wql.tab.c" /* yacc.c:1646 */
break;
case 28:
-#line 388 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 400 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_complex( ctx, (yyvsp[-2].expr), OP_LIKE, (yyvsp[0].expr) );
if (!(yyval.expr))
YYABORT;
}
-#line 1720 "wql.tab.c" /* yacc.c:1646 */
+#line 1732 "wql.tab.c" /* yacc.c:1646 */
break;
case 29:
-#line 394 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 406 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_ISNULL );
if (!(yyval.expr))
YYABORT;
}
-#line 1730 "wql.tab.c" /* yacc.c:1646 */
+#line 1742 "wql.tab.c" /* yacc.c:1646 */
break;
case 30:
-#line 400 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 412 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[-3].expr), OP_NOTNULL );
if (!(yyval.expr))
YYABORT;
}
-#line 1740 "wql.tab.c" /* yacc.c:1646 */
+#line 1752 "wql.tab.c" /* yacc.c:1646 */
break;
case 31:
-#line 406 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 418 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_ISNULL );
if (!(yyval.expr))
YYABORT;
}
-#line 1750 "wql.tab.c" /* yacc.c:1646 */
+#line 1762 "wql.tab.c" /* yacc.c:1646 */
break;
case 32:
-#line 412 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 424 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_ISNULL );
if (!(yyval.expr))
YYABORT;
}
-#line 1760 "wql.tab.c" /* yacc.c:1646 */
+#line 1772 "wql.tab.c" /* yacc.c:1646 */
break;
case 33:
-#line 418 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 430 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[-2].expr), OP_NOTNULL );
if (!(yyval.expr))
YYABORT;
}
-#line 1770 "wql.tab.c" /* yacc.c:1646 */
+#line 1782 "wql.tab.c" /* yacc.c:1646 */
break;
case 34:
-#line 424 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 436 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_unary( ctx, (yyvsp[0].expr), OP_NOTNULL );
if (!(yyval.expr))
YYABORT;
}
-#line 1780 "wql.tab.c" /* yacc.c:1646 */
+#line 1792 "wql.tab.c" /* yacc.c:1646 */
break;
case 35:
-#line 433 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 445 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) );
if (!(yyval.expr))
YYABORT;
}
-#line 1790 "wql.tab.c" /* yacc.c:1646 */
+#line 1802 "wql.tab.c" /* yacc.c:1646 */
break;
case 36:
-#line 442 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 454 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_propval( ctx, (yyvsp[0].proplist) );
if (!(yyval.expr))
YYABORT;
}
-#line 1800 "wql.tab.c" /* yacc.c:1646 */
+#line 1812 "wql.tab.c" /* yacc.c:1646 */
break;
case 37:
-#line 451 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 463 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_ival( ctx, (yyvsp[0].integer) );
if (!(yyval.expr))
YYABORT;
}
-#line 1810 "wql.tab.c" /* yacc.c:1646 */
+#line 1822 "wql.tab.c" /* yacc.c:1646 */
break;
case 38:
-#line 457 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 469 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_sval( ctx, &(yyvsp[0].str) );
if (!(yyval.expr))
YYABORT;
}
-#line 1820 "wql.tab.c" /* yacc.c:1646 */
+#line 1832 "wql.tab.c" /* yacc.c:1646 */
break;
case 39:
-#line 463 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 475 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_bval( ctx, -1 );
if (!(yyval.expr))
YYABORT;
}
-#line 1830 "wql.tab.c" /* yacc.c:1646 */
+#line 1842 "wql.tab.c" /* yacc.c:1646 */
break;
case 40:
-#line 469 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1646 */
+#line 481 "wql.y" /* yacc.c:1646 */
{
(yyval.expr) = expr_bval( ctx, 0 );
if (!(yyval.expr))
YYABORT;
}
-#line 1840 "wql.tab.c" /* yacc.c:1646 */
+#line 1852 "wql.tab.c" /* yacc.c:1646 */
break;
-#line 1844 "wql.tab.c" /* yacc.c:1646 */
+#line 1856 "wql.tab.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
#endif
return yyresult;
}
-#line 476 "e:/reactosSync3.0/dll/win32/wbemprox/wql.y" /* yacc.c:1906 */
+#line 488 "wql.y" /* yacc.c:1906 */
HRESULT parse_query( const WCHAR *str, struct view **view, struct list *mem )