[PATCH 1/2] wbemprox: Use wide character string literals.
Hans Leidekker
hans at codeweavers.com
Mon Apr 20 03:38:10 CDT 2020
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/wbemprox/builtin.c | 1661 +++++++++---------------------
dlls/wbemprox/class.c | 40 +-
dlls/wbemprox/process.c | 8 +-
dlls/wbemprox/qualifier.c | 31 +-
dlls/wbemprox/query.c | 78 +-
dlls/wbemprox/reg.c | 42 +-
dlls/wbemprox/security.c | 15 +-
dlls/wbemprox/service.c | 24 +-
dlls/wbemprox/services.c | 24 +-
dlls/wbemprox/table.c | 21 +-
dlls/wbemprox/wbemlocator.c | 11 +-
dlls/wbemprox/wbemprox_private.h | 30 -
12 files changed, 614 insertions(+), 1371 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 06c9d722aa..5035ca7b98 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -50,926 +50,390 @@
WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
-static const WCHAR class_associatorsW[] =
- {'_','_','A','S','S','O','C','I','A','T','O','R','S',0};
-static const WCHAR class_baseboardW[] =
- {'W','i','n','3','2','_','B','a','s','e','B','o','a','r','d',0};
-static const WCHAR class_biosW[] =
- {'W','i','n','3','2','_','B','I','O','S',0};
-static const WCHAR class_cdromdriveW[] =
- {'W','i','n','3','2','_','C','D','R','O','M','D','r','i','v','e',0};
-static const WCHAR class_compsysW[] =
- {'W','i','n','3','2','_','C','o','m','p','u','t','e','r','S','y','s','t','e','m',0};
-static const WCHAR class_compsysproductW[] =
- {'W','i','n','3','2','_','C','o','m','p','u','t','e','r','S','y','s','t','e','m','P','r','o','d','u','c','t',0};
-static const WCHAR class_datafileW[] =
- {'C','I','M','_','D','a','t','a','F','i','l','e',0};
-static const WCHAR class_desktopmonitorW[] =
- {'W','i','n','3','2','_','D','e','s','k','t','o','p','M','o','n','i','t','o','r',0};
-static const WCHAR class_directoryW[] =
- {'W','i','n','3','2','_','D','i','r','e','c','t','o','r','y',0};
-static const WCHAR class_diskdriveW[] =
- {'W','i','n','3','2','_','D','i','s','k','D','r','i','v','e',0};
-static const WCHAR class_diskdrivetodiskpartitionW[] =
- {'W','i','n','3','2','_','D','i','s','k','D','r','i','v','e','T','o','D','i','s','k','P','a','r','t','i','t','i','o','n',0};
-static const WCHAR class_diskpartitionW[] =
- {'W','i','n','3','2','_','D','i','s','k','P','a','r','t','i','t','i','o','n',0};
-static const WCHAR class_displaycontrollerconfigW[] =
- {'W','i','n','3','2','_','D','i','s','p','l','a','y','C','o','n','t','r','o','l','l','e','r',
- 'C','o','n','f','i','g','u','r','a','t','i','o','n',0};
-static const WCHAR class_ip4routetableW[] =
- {'W','i','n','3','2','_','I','P','4','R','o','u','t','e','T','a','b','l','e',0};
-static const WCHAR class_logicaldiskW[] =
- {'W','i','n','3','2','_','L','o','g','i','c','a','l','D','i','s','k',0};
-static const WCHAR class_logicaldisk2W[] =
- {'C','I','M','_','L','o','g','i','c','a','l','D','i','s','k',0};
-static const WCHAR class_logicaldisktopartitionW[] =
- {'W','i','n','3','2','_','L','o','g','i','c','a','l','D','i','s','k','T','o','P','a','r','t','i','t','i','o','n',0};
-static const WCHAR class_networkadapterW[] =
- {'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',0};
-static const WCHAR class_networkadapterconfigW[] =
- {'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',
- 'C','o','n','f','i','g','u','r','a','t','i','o','n',0};
-static const WCHAR class_operatingsystemW[] =
- {'W','i','n','3','2','_','O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0};
-static const WCHAR class_paramsW[] =
- {'_','_','P','A','R','A','M','E','T','E','R','S',0};
-static const WCHAR class_physicalmediaW[] =
- {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','d','i','a',0};
-static const WCHAR class_physicalmemoryW[] =
- {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
-static const WCHAR class_pnpentityW[] =
- {'W','i','n','3','2','_','P','n','P','E','n','t','i','t','y',0};
-static const WCHAR class_printerW[] =
- {'W','i','n','3','2','_','P','r','i','n','t','e','r',0};
-static const WCHAR class_process_getowner_outW[] =
- {'_','_','W','I','N','3','2','_','P','R','O','C','E','S','S','_','G','E','T','O','W',
- 'N','E','R','_','O','U','T',0};
-static const WCHAR class_processorW[] =
- {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0};
-static const WCHAR class_processor2W[] =
- {'C','I','M','_','P','r','o','c','e','s','s','o','r',0};
-static const WCHAR class_qualifiersW[] =
- {'_','_','Q','U','A','L','I','F','I','E','R','S',0};
-static const WCHAR class_quickfixengineeringW[] =
- {'W','i','n','3','2','_','Q','u','i','c','k','F','i','x','E','n','g','i','n','e','e','r','i','n','g',0};
-static const WCHAR class_sidW[] =
- {'W','i','n','3','2','_','S','I','D',0};
-static const WCHAR class_sounddeviceW[] =
- {'W','i','n','3','2','_','S','o','u','n','d','D','e','v','i','c','e',0};
-static const WCHAR class_systemenclosureW[] =
- {'W','i','n','3','2','_','S','y','s','t','e','m','E','n','c','l','o','s','u','r','e',0};
-static const WCHAR class_videocontrollerW[] =
- {'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0};
-static const WCHAR class_winsatW[] =
- {'W','i','n','3','2','_','W','i','n','S','A','T',0};
-
-static const WCHAR prop_accountnameW[] =
- {'A','c','c','o','u','n','t','N','a','m','e',0};
-static const WCHAR prop_acceptpauseW[] =
- {'A','c','c','e','p','t','P','a','u','s','e',0};
-static const WCHAR prop_acceptstopW[] =
- {'A','c','c','e','p','t','S','t','o','p',0};
-static const WCHAR prop_accessmaskW[] =
- {'A','c','c','e','s','s','M','a','s','k',0};
-static const WCHAR prop_adapterdactypeW[] =
- {'A','d','a','p','t','e','r','D','A','C','T','y','p','e',0};
-static const WCHAR prop_adapterramW[] =
- {'A','d','a','p','t','e','r','R','A','M',0};
-static const WCHAR prop_adaptertypeW[] =
- {'A','d','a','p','t','e','r','T','y','p','e',0};
-static const WCHAR prop_adaptertypeidW[] =
- {'A','d','a','p','t','e','r','T','y','p','e','I','D',0};
-static const WCHAR prop_addresswidthW[] =
- {'A','d','d','r','e','s','s','W','i','d','t','h',0};
-static const WCHAR prop_antecedentW[] =
- {'A','n','t','e','c','e','d','e','n','t',0};
-static const WCHAR prop_architectureW[] =
- {'A','r','c','h','i','t','e','c','t','u','r','e',0};
-static const WCHAR prop_assocclassW[] =
- {'A','s','s','o','c','C','l','a','s','s',0};
-static const WCHAR prop_associatorW[] =
- {'A','s','s','o','c','i','a','t','o','r',0};
-static const WCHAR prop_attributesW[] =
- {'A','t','t','r','i','b','u','t','e','s',0};
-static const WCHAR prop_availabilityW[] =
- {'A','v','a','i','l','a','b','i','l','i','t','y',0};
-static const WCHAR prop_binaryrepresentationW[] =
- {'B','i','n','a','r','y','R','e','p','r','e','s','e','n','t','a','t','i','o','n',0};
-static const WCHAR prop_bitsperpixelW[] =
- {'B','i','t','s','P','e','r','P','i','x','e','l',0};
-static const WCHAR prop_boolvalueW[] =
- {'B','o','o','l','V','a','l','u','e',0};
-static const WCHAR prop_bootableW[] =
- {'B','o','o','t','a','b','l','e',0};
-static const WCHAR prop_bootpartitionW[] =
- {'B','o','o','t','P','a','r','t','i','t','i','o','n',0};
-static const WCHAR prop_buildnumberW[] =
- {'B','u','i','l','d','N','u','m','b','e','r',0};
-static const WCHAR prop_capacityW[] =
- {'C','a','p','a','c','i','t','y',0};
-static const WCHAR prop_captionW[] =
- {'C','a','p','t','i','o','n',0};
-static const WCHAR prop_chassistypesW[] =
- {'C','h','a','s','s','i','s','T','y','p','e','s',0};
-static const WCHAR prop_classW[] =
- {'C','l','a','s','s',0};
-static const WCHAR prop_codesetW[] =
- {'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_configuredclockspeedW[] =
- {'C','o','n','f','i','g','u','r','e','d','C','l','o','c','k','S','p','e','e','d',0};
-static const WCHAR prop_countrycodeW[] =
- {'C','o','u','n','t','r','y','C','o','d','e',0};
-static const WCHAR prop_cpuscoreW[] =
- {'C','P','U','S','c','o','r','e',0};
-static const WCHAR prop_cpustatusW[] =
- {'C','p','u','S','t','a','t','u','s',0};
-static const WCHAR prop_csdversionW[] =
- {'C','S','D','V','e','r','s','i','o','n',0};
-static const WCHAR prop_csnameW[] =
- {'C','S','N','a','m','e',0};
-static const WCHAR prop_currentbitsperpixelW[] =
- {'C','u','r','r','e','n','t','B','i','t','s','P','e','r','P','i','x','e','l',0};
-static const WCHAR prop_currentclockspeedW[] =
- {'C','u','r','r','e','n','t','C','l','o','c','k','S','p','e','e','d',0};
-static const WCHAR prop_currenthorizontalresW[] =
- {'C','u','r','r','e','n','t','H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0};
-static const WCHAR prop_currentlanguageW[] =
- {'C','u','r','r','e','n','t','L','a','n','g','u','a','g','e',0};
-static const WCHAR prop_currentrefreshrateW[] =
- {'C','u','r','r','e','n','t','R','e','f','r','e','s','h','R','a','t','e',0};
-static const WCHAR prop_currentscanmodeW[] =
- {'C','u','r','r','e','n','t','S','c','a','n','M','o','d','e',0};
-static const WCHAR prop_currenttimezoneW[] =
- {'C','u','r','r','e','n','t','T','i','m','e','Z','o','n','e',0};
-static const WCHAR prop_currentverticalresW[] =
- {'C','u','r','r','e','n','t','V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0};
-static const WCHAR prop_d3dscoreW[] =
- {'D','3','D','S','c','o','r','e',0};
-static const WCHAR prop_datawidthW[] =
- {'D','a','t','a','W','i','d','t','h',0};
-static const WCHAR prop_defaultipgatewayW[] =
- {'D','e','f','a','u','l','t','I','P','G','a','t','e','w','a','y',0};
-static const WCHAR prop_defaultvalueW[] =
- {'D','e','f','a','u','l','t','V','a','l','u','e',0};
-static const WCHAR prop_dependentW[] =
- {'D','e','p','e','n','d','e','n','t',0};
-static const WCHAR prop_descriptionW[] =
- {'D','e','s','c','r','i','p','t','i','o','n',0};
-static const WCHAR prop_destinationW[] =
- {'D','e','s','t','i','n','a','t','i','o','n',0};
-static const WCHAR prop_deviceidW[] =
- {'D','e','v','i','c','e','I','d',0};
-static const WCHAR prop_devicelocatorW[] =
- {'D','e','v','i','c','e','L','o','c','a','t','o','r',0};
-static const WCHAR prop_dhcpenabledW[] =
- {'D','H','C','P','E','n','a','b','l','e','d',0};
-static const WCHAR prop_directionW[] =
- {'D','i','r','e','c','t','i','o','n',0};
-static const WCHAR prop_diskscoreW[] =
- {'D','i','s','k','S','c','o','r','e',0};
-static const WCHAR prop_displaynameW[] =
- {'D','i','s','p','l','a','y','N','a','m','e',0};
-static const WCHAR prop_diskindexW[] =
- {'D','i','s','k','I','n','d','e','x',0};
-static const WCHAR prop_dnshostnameW[] =
- {'D','N','S','H','o','s','t','N','a','m','e',0};
-static const WCHAR prop_dnsserversearchorderW[] =
- {'D','N','S','S','e','r','v','e','r','S','e','a','r','c','h','O','r','d','e','r',0};
-static const WCHAR prop_domainW[] =
- {'D','o','m','a','i','n',0};
-static const WCHAR prop_domainroleW[] =
- {'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};
-static const WCHAR prop_driverversionW[] =
- {'D','r','i','v','e','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_drivetypeW[] =
- {'D','r','i','v','e','T','y','p','e',0};
-static const WCHAR prop_embeddedcontrollermajorversionW[] =
- {'E','m','b','e','d','d','e','d','C','o','n','t','r','o','l','l','e','r','M','a','j','o','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_embeddedcontrollerminorversionW[] =
- {'E','m','b','e','d','d','e','d','C','o','n','t','r','o','l','l','e','r','M','i','n','o','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_familyW[] =
- {'F','a','m','i','l','y',0};
-static const WCHAR prop_filesystemW[] =
- {'F','i','l','e','S','y','s','t','e','m',0};
-static const WCHAR prop_flavorW[] =
- {'F','l','a','v','o','r',0};
-static const WCHAR prop_formfactorW[] =
- {'F','o','r','m','F','a','c','t','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_graphicsscoreW[] =
- {'G','r','a','p','h','i','c','s','S','c','o','r','e',0};
-static const WCHAR prop_horizontalresolutionW[] =
- {'H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0};
-static const WCHAR prop_hotfixidW[] =
- {'H','o','t','F','i','x','I','D',0};
-static const WCHAR prop_idW[] =
- {'I','D',0};
-static const WCHAR prop_identificationcodeW[] =
- {'I','d','e','n','t','i','f','i','c','a','t','i','o','n','C','o','d','e',0};
-static const WCHAR prop_identifyingnumberW[] =
- {'I','d','e','n','t','i','f','y','i','n','g','N','u','m','b','e','r',0};
-static const WCHAR prop_indexW[] =
- {'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','n','t','e','r','f','a','c','e','T','y','p','e',0};
-static const WCHAR prop_intvalueW[] =
- {'I','n','t','e','g','e','r','V','a','l','u','e',0};
-static const WCHAR prop_ipaddressW[] =
- {'I','P','A','d','d','r','e','s','s',0};
-static const WCHAR prop_ipconnectionmetricW[] =
- {'I','P','C','o','n','n','e','c','t','i','o','n','M','e','t','r','i','c',0};
-static const WCHAR prop_ipenabledW[] =
- {'I','P','E','n','a','b','l','e','d',0};
-static const WCHAR prop_ipsubnet[] =
- {'I','P','S','u','b','n','e','t',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[] =
- {'M','A','C','A','d','d','r','e','s','s',0};
-static const WCHAR prop_manufacturerW[] =
- {'M','a','n','u','f','a','c','t','u','r','e','r',0};
-static const WCHAR prop_maxclockspeedW[] =
- {'M','a','x','C','l','o','c','k','S','p','e','e','d',0};
-static const WCHAR prop_mediatypeW[] =
- {'M','e','d','i','a','T','y','p','e',0};
-static const WCHAR prop_memberW[] =
- {'M','e','m','b','e','r',0};
-static const WCHAR prop_memoryscoreW[] =
- {'M','e','m','o','r','y','S','c','o','r','e',0};
-static const WCHAR prop_memorytypeW[] =
- {'M','e','m','o','r','y','T','y','p','e',0};
-static const WCHAR prop_methodW[] =
- {'M','e','t','h','o','d',0};
-static const WCHAR prop_modelW[] =
- {'M','o','d','e','l',0};
-static const WCHAR prop_netconnectionstatusW[] =
- {'N','e','t','C','o','n','n','e','c','t','i','o','n','S','t','a','t','u','s',0};
-static const WCHAR prop_networkW[] =
- {'N','e','t','w','o','r','k',0};
-static const WCHAR prop_nexthopW[] =
- {'N','e','x','t','H','o','p',0};
-static const WCHAR prop_numcoresW[] =
- {'N','u','m','b','e','r','O','f','C','o','r','e','s',0};
-static const WCHAR prop_numlogicalprocessorsW[] =
- {'N','u','m','b','e','r','O','f','L','o','g','i','c','a','l','P','r','o','c','e','s','s','o','r','s',0};
-static const WCHAR prop_numprocessorsW[] =
- {'N','u','m','b','e','r','O','f','P','r','o','c','e','s','s','o','r','s',0};
-static const WCHAR prop_operatingsystemskuW[] =
- {'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m','S','K','U',0};
-static const WCHAR prop_osarchitectureW[] =
- {'O','S','A','r','c','h','i','t','e','c','t','u','r','e',0};
-static const WCHAR prop_oslanguageW[] =
- {'O','S','L','a','n','g','u','a','g','e',0};
-static const WCHAR prop_osproductsuiteW[] =
- {'O','S','P','r','o','d','u','c','t','S','u','i','t','e',0};
-static const WCHAR prop_ostypeW[] =
- {'O','S','T','y','p','e',0};
-static const WCHAR prop_parameterW[] =
- {'P','a','r','a','m','e','t','e','r',0};
-static const WCHAR prop_partnumberW[] =
- {'P','a','r','t','N','u','m','b','e','r',0};
-static const WCHAR prop_physicaladapterW[] =
- {'P','h','y','s','i','c','a','l','A','d','a','p','t','e','r',0};
-static const WCHAR prop_pixelsperxlogicalinchW[] =
- {'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[] =
- {'P','r','i','m','a','r','y',0};
-static const WCHAR prop_processidW[] =
- {'P','r','o','c','e','s','s','I','D',0};
-static const WCHAR prop_processoridW[] =
- {'P','r','o','c','e','s','s','o','r','I','d',0};
-static const WCHAR prop_processortypeW[] =
- {'P','r','o','c','e','s','s','o','r','T','y','p','e',0};
-static const WCHAR prop_productW[] =
- {'P','r','o','d','u','c','t',0};
-static const WCHAR prop_productnameW[] =
- {'P','r','o','d','u','c','t','N','a','m','e',0};
-static const WCHAR prop_referenceddomainnameW[] =
- {'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','P','a','c','k','M','a','j','o','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_servicepackminorW[] =
- {'S','e','r','v','i','c','e','P','a','c','k','M','i','n','o','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_servicetypeW[] =
- {'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','I','D',0};
-static const WCHAR prop_sidlengthW[] =
- {'S','i','d','L','e','n','g','t','h',0};
-static const WCHAR prop_sizeW[] =
- {'S','i','z','e',0};
-static const WCHAR prop_speedW[] =
- {'S','p','e','e','d',0};
-static const WCHAR prop_startingoffsetW[] =
- {'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[] =
- {'S','t','r','i','n','g','V','a','l','u','e',0};
-static const WCHAR prop_suitemaskW[] =
- {'S','u','i','t','e','M','a','s','k',0};
-static const WCHAR prop_systembiosmajorversionW[] =
- {'S','y','s','t','e','m','B','i','o','s','M','a','j','o','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_systembiosminorversionW[] =
- {'S','y','s','t','e','m','B','i','o','s','M','i','n','o','r','V','e','r','s','i','o','n',0};
-static const WCHAR prop_systemdirectoryW[] =
- {'S','y','s','t','e','m','D','i','r','e','c','t','o','r','y',0};
-static const WCHAR prop_systemdriveW[] =
- {'S','y','s','t','e','m','D','r','i','v','e',0};
-static const WCHAR prop_systemnameW[] =
- {'S','y','s','t','e','m','N','a','m','e',0};
-static const WCHAR prop_tagW[] =
- {'T','a','g',0};
-static const WCHAR prop_threadcountW[] =
- {'T','h','r','e','a','d','C','o','u','n','t',0};
-static const WCHAR prop_timetakenW[] =
- {'T','i','m','e','T','a','k','e','n',0};
-static const WCHAR prop_totalphysicalmemoryW[] =
- {'T','o','t','a','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0};
-static const WCHAR prop_totalvirtualmemorysizeW[] =
- {'T','o','t','a','l','V','i','r','t','u','a','l','M','e','m','o','r','y','S','i','z','e',0};
-static const WCHAR prop_totalvisiblememorysizeW[] =
- {'T','o','t','a','l','V','i','s','i','b','l','e','M','e','m','o','r','y','S','i','z','e',0};
-static const WCHAR prop_typeW[] =
- {'T','y','p','e',0};
-static const WCHAR prop_uniqueidW[] =
- {'U','n','i','q','u','e','I','d',0};
-static const WCHAR prop_usernameW[] =
- {'U','s','e','r','N','a','m','e',0};
-static const WCHAR prop_uuidW[] =
- {'U','U','I','D',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};
-static const WCHAR prop_verticalresolutionW[] =
- {'V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0};
-static const WCHAR prop_videoarchitectureW[] =
- {'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0};
-static const WCHAR prop_videomemorytypeW[] =
- {'V','i','d','e','o','M','e','m','o','r','y','T','y','p','e',0};
-static const WCHAR prop_videomodedescriptionW[] =
- {'V','i','d','e','o','M','o','d','e','D','e','s','c','r','i','p','t','i','o','n',0};
-static const WCHAR prop_videoprocessorW[] =
- {'V','i','d','e','o','P','r','o','c','e','s','s','o','r',0};
-static const WCHAR prop_volumenameW[] =
- {'V','o','l','u','m','e','N','a','m','e',0};
-static const WCHAR prop_volumeserialnumberW[] =
- {'V','o','l','u','m','e','S','e','r','i','a','l','N','u','m','b','e','r',0};
-static const WCHAR prop_winsatassessmentstateW[] =
- {'W','i','n','S','A','T','A','s','s','e','s','s','m','e','n','t','S','t','a','t','e',0};
-static const WCHAR prop_winsprlevelW[] =
- {'W','i','n','S','P','R','L','e','v','e','l',0};
-static const WCHAR prop_workingsetsizeW[] =
- {'W','o','r','k','i','n','g','S','e','t','S','i','z','e',0};
-
/* column definitions must be kept in sync with record structures below */
static const struct column col_associator[] =
{
- { prop_assocclassW, CIM_STRING },
- { prop_classW, CIM_STRING },
- { prop_associatorW, CIM_STRING }
+ { L"AssocClass", CIM_STRING },
+ { L"Class", CIM_STRING },
+ { L"Associator", CIM_STRING }
};
static const struct column col_baseboard[] =
{
- { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_modelW, CIM_STRING },
- { prop_nameW, CIM_STRING },
- { prop_productW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_serialnumberW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_tagW, CIM_STRING|COL_FLAG_KEY },
- { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"Manufacturer", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Model", CIM_STRING },
+ { L"Name", CIM_STRING },
+ { L"Product", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"SerialNumber", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Tag", CIM_STRING|COL_FLAG_KEY },
+ { L"Version", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_bios[] =
{
- { prop_currentlanguageW, CIM_STRING },
- { prop_descriptionW, CIM_STRING },
- { prop_embeddedcontrollermajorversionW, CIM_UINT8 },
- { prop_embeddedcontrollerminorversionW, CIM_UINT8 },
- { prop_identificationcodeW, CIM_STRING },
- { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_nameW, CIM_STRING },
- { prop_releasedateW, CIM_DATETIME|COL_FLAG_DYNAMIC },
- { prop_serialnumberW, CIM_STRING },
- { prop_smbiosbiosversionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_smbiosmajorversionW, CIM_UINT16 },
- { prop_smbiosminorversionW, CIM_UINT16 },
- { prop_systembiosmajorversionW, CIM_UINT8 },
- { prop_systembiosminorversionW, CIM_UINT8 },
- { prop_versionW, CIM_STRING|COL_FLAG_KEY }
+ { L"CurrentLanguage", CIM_STRING },
+ { L"Description", CIM_STRING },
+ { L"EmbeddedControllerMajorVersion", CIM_UINT8 },
+ { L"EmbeddedControllerMinorVersion", CIM_UINT8 },
+ { L"IdentificationCode", CIM_STRING },
+ { L"Manufacturer", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Name", CIM_STRING },
+ { L"ReleaseDate", CIM_DATETIME|COL_FLAG_DYNAMIC },
+ { L"SerialNumber", CIM_STRING },
+ { L"SMBIOSBIOSVersion", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"SMBIOSMajorVersion", CIM_UINT16 },
+ { L"SMBIOSMinorVersion", CIM_UINT16 },
+ { L"SystemBiosMajorVersion", CIM_UINT8 },
+ { L"SystemBiosMinorVersion", CIM_UINT8 },
+ { L"Version", CIM_STRING|COL_FLAG_KEY },
};
static const struct column col_cdromdrive[] =
{
- { prop_deviceidW, CIM_STRING|COL_FLAG_KEY },
- { prop_driveW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_mediatypeW, CIM_STRING },
- { prop_nameW, CIM_STRING },
- { prop_pnpdeviceidW, CIM_STRING }
+ { L"DeviceId", CIM_STRING|COL_FLAG_KEY },
+ { L"Drive", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"MediaType", CIM_STRING },
+ { L"Name", CIM_STRING },
+ { L"PNPDeviceID", CIM_STRING },
};
static const struct column col_compsys[] =
{
- { prop_descriptionW, CIM_STRING },
- { prop_domainW, CIM_STRING },
- { prop_domainroleW, CIM_UINT16 },
- { prop_manufacturerW, CIM_STRING },
- { prop_modelW, CIM_STRING },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_numlogicalprocessorsW, CIM_UINT32 },
- { prop_numprocessorsW, CIM_UINT32 },
- { prop_totalphysicalmemoryW, CIM_UINT64 },
- { prop_usernameW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"Description", CIM_STRING },
+ { L"Domain", CIM_STRING },
+ { L"DomainRole", CIM_UINT16 },
+ { L"Manufacturer", CIM_STRING },
+ { L"Model", CIM_STRING },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"NumberOfLogicalProcessors", CIM_UINT32 },
+ { L"NumberOfProcessors", CIM_UINT32 },
+ { L"TotalPhysicalMemory", CIM_UINT64 },
+ { L"UserName", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_compsysproduct[] =
{
- { prop_identifyingnumberW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_skunumberW, CIM_STRING },
- { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_vendorW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }
+ { L"IdentifyingNumber", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"SKUNumber", CIM_STRING },
+ { L"UUID", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Vendor", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Version", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
};
static const struct column col_datafile[] =
{
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Version", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_desktopmonitor[] =
{
- { prop_nameW, CIM_STRING },
- { prop_pixelsperxlogicalinchW, CIM_UINT32 }
+ { L"Name", CIM_STRING },
+ { L"PixelsPerXLogicalInch", CIM_UINT32 },
};
static const struct column col_directory[] =
{
- { prop_accessmaskW, CIM_UINT32 },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }
+ { L"AccessMask", CIM_UINT32 },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
};
static const struct column col_diskdrive[] =
{
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_indexW, CIM_UINT32 },
- { prop_interfacetypeW, CIM_STRING },
- { prop_manufacturerW, CIM_STRING },
- { prop_mediatypeW, CIM_STRING },
- { prop_modelW, CIM_STRING },
- { prop_pnpdeviceidW, CIM_STRING },
- { prop_serialnumberW, CIM_STRING },
- { prop_sizeW, CIM_UINT64 }
+ { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Index", CIM_UINT32 },
+ { L"InterfaceType", CIM_STRING },
+ { L"Manufacturer", CIM_STRING },
+ { L"MediaType", CIM_STRING },
+ { L"Model", CIM_STRING },
+ { L"PNPDeviceID", CIM_STRING },
+ { L"SerialNumber", CIM_STRING },
+ { L"Size", CIM_UINT64 },
};
static const struct column col_diskdrivetodiskpartition[] =
{
- { prop_antecedentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_dependentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY }
+ { L"Antecedent", CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Dependent", CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
};
static const struct column col_diskpartition[] =
{
- { prop_bootableW, CIM_BOOLEAN },
- { prop_bootpartitionW, CIM_BOOLEAN },
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_diskindexW, CIM_UINT32 },
- { prop_indexW, CIM_UINT32 },
- { prop_pnpdeviceidW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_sizeW, CIM_UINT64 },
- { prop_startingoffsetW, CIM_UINT64 },
- { prop_typeW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"Bootable", CIM_BOOLEAN },
+ { L"BootPartition", CIM_BOOLEAN },
+ { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"DiskIndex", CIM_UINT32 },
+ { L"Index", CIM_UINT32 },
+ { L"PNPDeviceID", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Size", CIM_UINT64 },
+ { L"StartingOffset", CIM_UINT64 },
+ { L"Type", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_displaycontrollerconfig[] =
{
- { prop_bitsperpixelW, CIM_UINT32 },
- { prop_captionW, CIM_STRING },
- { prop_horizontalresolutionW, CIM_UINT32 },
- { prop_nameW, CIM_STRING|COL_FLAG_KEY },
- { prop_verticalresolutionW, CIM_UINT32 }
+ { L"BitsPerPixel", CIM_UINT32 },
+ { L"Caption", CIM_STRING },
+ { L"HorizontalResolution", CIM_UINT32 },
+ { L"Name", CIM_STRING|COL_FLAG_KEY },
+ { L"VerticalResolution", CIM_UINT32 },
};
static const struct column col_ip4routetable[] =
{
- { prop_destinationW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_interfaceindexW, CIM_SINT32|COL_FLAG_KEY },
- { prop_nexthopW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Destination", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"InterfaceIndex", CIM_SINT32|COL_FLAG_KEY },
+ { L"NextHop", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
};
static const struct column col_logicaldisk[] =
{
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_drivetypeW, CIM_UINT32 },
- { prop_filesystemW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_freespaceW, CIM_UINT64 },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_sizeW, CIM_UINT64 },
- { prop_volumenameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_volumeserialnumberW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"DriveType", CIM_UINT32 },
+ { L"FileSystem", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"FreeSpace", CIM_UINT64 },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Size", CIM_UINT64 },
+ { L"VolumeName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"VolumeSerialNumber", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_logicaldisktopartition[] =
{
- { prop_antecedentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_dependentW, CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY }
+ { L"Antecedent", CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Dependent", CIM_REFERENCE|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
};
static const struct column col_networkadapter[] =
{
- { prop_adaptertypeW, CIM_STRING },
- { prop_adaptertypeidW, CIM_UINT16 },
- { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_indexW, CIM_UINT32 },
- { prop_interfaceindexW, CIM_UINT32 },
- { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_manufacturerW, CIM_STRING },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_netconnectionstatusW, CIM_UINT16 },
- { prop_physicaladapterW, CIM_BOOLEAN },
- { prop_pnpdeviceidW, CIM_STRING },
- { prop_speedW, CIM_UINT64 }
+ { L"AdapterType", CIM_STRING },
+ { L"AdapterTypeID", CIM_UINT16 },
+ { L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Index", CIM_UINT32 },
+ { L"InterfaceIndex", CIM_UINT32 },
+ { L"MACAddress", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Manufacturer", CIM_STRING },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"NetConnectionStatus", CIM_UINT16 },
+ { L"PhysicalAdapter", CIM_BOOLEAN },
+ { L"PNPDeviceID", CIM_STRING },
+ { L"Speed", CIM_UINT64 },
};
static const struct column col_networkadapterconfig[] =
{
- { prop_defaultipgatewayW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
- { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_dhcpenabledW, CIM_BOOLEAN },
- { prop_dnshostnameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_dnsserversearchorderW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
- { prop_indexW, CIM_UINT32|COL_FLAG_KEY },
- { prop_ipaddressW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
- { prop_ipconnectionmetricW, CIM_UINT32 },
- { prop_ipenabledW, CIM_BOOLEAN },
- { prop_ipsubnet, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
- { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_settingidW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"DefaultIPGateway", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
+ { L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"DHCPEnabled", CIM_BOOLEAN },
+ { L"DNSHostName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"DNSServerSearchOrder", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
+ { L"Index", CIM_UINT32|COL_FLAG_KEY },
+ { L"IPAddress", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
+ { L"IPConnectionMetric", CIM_UINT32 },
+ { L"IPEnabled", CIM_BOOLEAN },
+ { L"IPSubnet", CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
+ { L"MACAddress", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"SettingID", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_operatingsystem[] =
{
- { prop_buildnumberW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_codesetW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_countrycodeW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_csdversionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_csnameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_currenttimezoneW, CIM_SINT16 },
- { prop_freephysicalmemoryW, CIM_UINT64 },
- { prop_installdateW, CIM_DATETIME },
- { prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
- { prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC },
- { prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_manufacturerW, CIM_STRING },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_operatingsystemskuW, CIM_UINT32 },
- { prop_osarchitectureW, CIM_STRING },
- { prop_oslanguageW, CIM_UINT32 },
- { prop_osproductsuiteW, CIM_UINT32 },
- { prop_ostypeW, CIM_UINT16 },
- { prop_primaryW, CIM_BOOLEAN },
- { prop_serialnumberW, CIM_STRING },
- { prop_servicepackmajorW, CIM_UINT16 },
- { prop_servicepackminorW, CIM_UINT16 },
- { prop_suitemaskW, CIM_UINT32 },
- { prop_systemdirectoryW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_systemdriveW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_totalvirtualmemorysizeW, CIM_UINT64 },
- { prop_totalvisiblememorysizeW, CIM_UINT64 },
- { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"BuildNumber", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Caption", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CodeSet", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CountryCode", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CSDVersion", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CSName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CurrentTimeZone", CIM_SINT16 },
+ { L"FreePhysicalMemory", CIM_UINT64 },
+ { L"InstallDate", CIM_DATETIME },
+ { L"LastBootUpTime", CIM_DATETIME|COL_FLAG_DYNAMIC },
+ { L"LocalDateTime", CIM_DATETIME|COL_FLAG_DYNAMIC },
+ { L"Locale", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Manufacturer", CIM_STRING },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"OperatingSystemSKU", CIM_UINT32 },
+ { L"OSArchitecture", CIM_STRING },
+ { L"OSLanguage", CIM_UINT32 },
+ { L"OSProductSuite", CIM_UINT32 },
+ { L"OSType", CIM_UINT16 },
+ { L"Primary", CIM_BOOLEAN },
+ { L"SerialNumber", CIM_STRING },
+ { L"ServicePackMajorVersion", CIM_UINT16 },
+ { L"ServicePackMinorVersion", CIM_UINT16 },
+ { L"SuiteMask", CIM_UINT32 },
+ { L"SystemDirectory", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"SystemDrive", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"TotalVirtualMemorySize", CIM_UINT64 },
+ { L"TotalVisibleMemorySize", CIM_UINT64 },
+ { L"Version", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_param[] =
{
- { prop_classW, CIM_STRING },
- { prop_methodW, CIM_STRING },
- { prop_directionW, CIM_SINT32 },
- { prop_parameterW, CIM_STRING },
- { prop_typeW, CIM_UINT32 },
- { prop_defaultvalueW, CIM_UINT32 }
+ { L"Class", CIM_STRING },
+ { L"Method", CIM_STRING },
+ { L"Direction", CIM_SINT32 },
+ { L"Parameter", CIM_STRING },
+ { L"Type", CIM_UINT32 },
+ { L"DefaultValue", CIM_UINT32 },
};
static const struct column col_physicalmedia[] =
{
- { prop_serialnumberW, CIM_STRING },
- { prop_tagW, CIM_STRING }
+ { L"SerialNumber", CIM_STRING },
+ { L"Tag", CIM_STRING },
};
static const struct column col_physicalmemory[] =
{
- { prop_capacityW, CIM_UINT64 },
- { prop_configuredclockspeedW, CIM_UINT32 },
- { prop_devicelocatorW, CIM_STRING },
- { prop_formfactorW, CIM_UINT16 },
- { prop_memorytypeW, CIM_UINT16 },
- { prop_partnumberW, CIM_STRING }
+ { L"Capacity", CIM_UINT64 },
+ { L"ConfiguredClockSpeed", CIM_UINT32 },
+ { L"DeviceLocator", CIM_STRING },
+ { L"FormFactor", CIM_UINT16 },
+ { L"MemoryType", CIM_UINT16 },
+ { L"PartNumber", CIM_STRING },
};
static const struct column col_pnpentity[] =
{
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"DeviceId", CIM_STRING|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_portnameW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Attributes", CIM_UINT32 },
+ { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"DriverName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"HorizontalResolution", CIM_UINT32 },
+ { L"Local", CIM_BOOLEAN },
+ { L"Location", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Network", CIM_BOOLEAN },
+ { L"PortName", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_process[] =
{
- { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_commandlineW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_handleW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_pprocessidW, CIM_UINT32 },
- { prop_processidW, CIM_UINT32 },
- { prop_threadcountW, CIM_UINT32 },
- { prop_workingsetsizeW, CIM_UINT64 },
+ { L"Caption", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CommandLine", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Handle", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"ParentProcessID", CIM_UINT32 },
+ { L"ProcessID", CIM_UINT32 },
+ { L"ThreadCount", CIM_UINT32 },
+ { L"WorkingSetSize", CIM_UINT64 },
/* methods */
- { method_getownerW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }
+ { L"GetOwner", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
};
static const struct column col_processor[] =
{
- { prop_addresswidthW, CIM_UINT16 },
- { prop_architectureW, CIM_UINT16 },
- { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_cpustatusW, CIM_UINT16 },
- { prop_currentclockspeedW, CIM_UINT32 },
- { prop_datawidthW, CIM_UINT16 },
- { prop_descriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_familyW, CIM_UINT16 },
- { prop_levelW, CIM_UINT16 },
- { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_maxclockspeedW, CIM_UINT32 },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_numcoresW, CIM_UINT32 },
- { prop_numlogicalprocessorsW, CIM_UINT32 },
- { prop_processoridW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_processortypeW, CIM_UINT16 },
- { prop_revisionW, CIM_UINT16 },
- { prop_uniqueidW, CIM_STRING },
- { prop_versionW, CIM_STRING|COL_FLAG_DYNAMIC }
+ { L"AddressWidth", CIM_UINT16 },
+ { L"Architecture", CIM_UINT16 },
+ { L"Caption", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"CpuStatus", CIM_UINT16 },
+ { L"CurrentClockSpeed", CIM_UINT32 },
+ { L"DataWidth", CIM_UINT16 },
+ { L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"DeviceId", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"Family", CIM_UINT16 },
+ { L"Level", CIM_UINT16 },
+ { L"Manufacturer", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"MaxClockSpeed", CIM_UINT32 },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"NumberOfCores", CIM_UINT32 },
+ { L"NumberOfLogicalProcessors", CIM_UINT32 },
+ { L"ProcessorId", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"ProcessorType", CIM_UINT16 },
+ { L"Revision", CIM_UINT16 },
+ { L"UniqueId", CIM_STRING },
+ { L"Version", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_qualifier[] =
{
- { prop_classW, CIM_STRING },
- { prop_memberW, CIM_STRING },
- { prop_typeW, CIM_UINT32 },
- { prop_flavorW, CIM_SINT32 },
- { prop_nameW, CIM_STRING },
- { prop_intvalueW, CIM_SINT32 },
- { prop_strvalueW, CIM_STRING },
- { prop_boolvalueW, CIM_BOOLEAN }
+ { L"Class", CIM_STRING },
+ { L"Member", CIM_STRING },
+ { L"Type", CIM_UINT32 },
+ { L"Flavor", CIM_SINT32 },
+ { L"Name", CIM_STRING },
+ { L"IntegerValue", CIM_SINT32 },
+ { L"StringValue", CIM_STRING },
+ { L"BoolValue", CIM_BOOLEAN },
};
static const struct column col_quickfixengineering[] =
{
- { prop_captionW, CIM_STRING },
- { prop_hotfixidW, CIM_STRING|COL_FLAG_KEY }
+ { L"Caption", CIM_STRING },
+ { L"HotFixID", CIM_STRING|COL_FLAG_KEY },
};
static const struct column col_service[] =
{
- { prop_acceptpauseW, CIM_BOOLEAN },
- { prop_acceptstopW, CIM_BOOLEAN },
- { prop_displaynameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_nameW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_processidW, CIM_UINT32 },
- { prop_servicetypeW, CIM_STRING },
- { prop_startmodeW, CIM_STRING },
- { prop_stateW, CIM_STRING },
- { prop_systemnameW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"AcceptPause", CIM_BOOLEAN },
+ { L"AcceptStop", CIM_BOOLEAN },
+ { L"DisplayName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"ProcessID", CIM_UINT32 },
+ { L"ServiceType", CIM_STRING },
+ { L"StartMode", CIM_STRING },
+ { L"State", CIM_STRING },
+ { L"SystemName", CIM_STRING|COL_FLAG_DYNAMIC },
/* methods */
- { method_pauseserviceW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_resumeserviceW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_startserviceW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_stopserviceW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }
+ { L"PauseService", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"ResumeService", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"StartService", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"StopService", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
};
static const struct column col_sid[] =
{
- { prop_accountnameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_binaryrepresentationW, CIM_UINT8|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
- { prop_referenceddomainnameW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_sidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
- { prop_sidlengthW, CIM_UINT32 }
+ { L"AccountName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"BinaryRepresentation", CIM_UINT8|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
+ { L"ReferencedDomainName", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"SID", CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
+ { L"SidLength", CIM_UINT32 },
};
static const struct column col_sounddevice[] =
{
- { prop_nameW, CIM_STRING },
- { prop_productnameW, CIM_STRING },
- { prop_statusinfoW, CIM_UINT16 }
+ { L"Name", CIM_STRING },
+ { L"ProductName", CIM_STRING },
+ { L"StatusInfo", CIM_UINT16 },
};
static const struct column col_stdregprov[] =
{
- { method_createkeyW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_enumkeyW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_enumvaluesW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_getstringvalueW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }
+ { L"CreateKey", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"EnumKey", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"EnumValues", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"GetStringValue", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
};
static const struct column col_systemenclosure[] =
{
- { prop_captionW, CIM_STRING },
- { prop_chassistypesW, CIM_UINT16|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
- { prop_descriptionW, CIM_STRING },
- { prop_lockpresentW, CIM_BOOLEAN },
- { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_nameW, CIM_STRING },
- { prop_tagW, CIM_STRING },
+ { L"Caption", CIM_STRING },
+ { L"ChassisTypes", CIM_UINT16|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
+ { L"Description", CIM_STRING },
+ { L"LockPresent", CIM_BOOLEAN },
+ { L"Manufacturer", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Name", CIM_STRING },
+ { L"Tag", CIM_STRING },
};
static const struct column col_systemsecurity[] =
{
- { method_getsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
- { method_setsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"GetSD", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
+ { L"SetSD", CIM_FLAG_ARRAY|COL_FLAG_METHOD },
};
static const struct column col_videocontroller[] =
{
- { prop_adapterdactypeW, CIM_STRING },
- { prop_adapterramW, CIM_UINT32 },
- { prop_availabilityW, CIM_UINT16 },
- { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_configmanagererrorcodeW, CIM_UINT32 },
- { prop_currentbitsperpixelW, CIM_UINT32 },
- { prop_currenthorizontalresW, CIM_UINT32 },
- { prop_currentrefreshrateW, CIM_UINT32 },
- { prop_currentscanmodeW, CIM_UINT16 },
- { prop_currentverticalresW, CIM_UINT32 },
- { 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 },
- { prop_videomemorytypeW, CIM_UINT16 },
- { prop_videomodedescriptionW, CIM_STRING|COL_FLAG_DYNAMIC },
- { prop_videoprocessorW, CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"AdapterDACType", CIM_STRING },
+ { L"AdapterRAM", CIM_UINT32 },
+ { L"Availability", CIM_UINT16 },
+ { L"Caption", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"ConfigManagerErrorCode", CIM_UINT32 },
+ { L"CurrentBitsPerPixel", CIM_UINT32 },
+ { L"CurrentHorizontalResolution", CIM_UINT32 },
+ { L"CurrentRefreshRate", CIM_UINT32 },
+ { L"CurrentScanMode", CIM_UINT16 },
+ { L"CurrentVerticalResolution", CIM_UINT32 },
+ { L"Description", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"DeviceId", CIM_STRING|COL_FLAG_KEY },
+ { L"DriverDate", CIM_DATETIME },
+ { L"DriverVersion", CIM_STRING },
+ { L"InstalledDisplayDrivers", CIM_STRING },
+ { L"Name", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"PNPDeviceID", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"Status", CIM_STRING },
+ { L"VideoArchitecture", CIM_UINT16 },
+ { L"VideoMemoryType", CIM_UINT16 },
+ { L"VideoModeDescription", CIM_STRING|COL_FLAG_DYNAMIC },
+ { L"VideoProcessor", CIM_STRING|COL_FLAG_DYNAMIC },
};
static const struct column col_winsat[] =
{
- { prop_cpuscoreW, CIM_REAL32 },
- { prop_d3dscoreW, CIM_REAL32 },
- { prop_diskscoreW, CIM_REAL32 },
- { prop_graphicsscoreW, CIM_REAL32 },
- { prop_memoryscoreW, CIM_REAL32 },
- { prop_timetakenW, CIM_STRING|COL_FLAG_KEY },
- { prop_winsatassessmentstateW, CIM_UINT32 },
- { prop_winsprlevelW, CIM_REAL32 },
+ { L"CPUScore", CIM_REAL32 },
+ { L"D3DScore", CIM_REAL32 },
+ { L"DiskScore", CIM_REAL32 },
+ { L"GraphicsScore", CIM_REAL32 },
+ { L"MemoryScore", CIM_REAL32 },
+ { L"TimeTaken", CIM_STRING|COL_FLAG_KEY },
+ { L"WinSATAssessmentState", CIM_UINT32 },
+ { L"WinSPRLevel", CIM_REAL32 },
};
-static const WCHAR baseboard_manufacturerW[] =
- {'I','n','t','e','l',' ','C','o','r','p','o','r','a','t','i','o','n',0};
-static const WCHAR baseboard_serialnumberW[] =
- {'N','o','n','e',0};
-static const WCHAR baseboard_tagW[] =
- {'B','a','s','e',' ','B','o','a','r','d',0};
-static const WCHAR baseboard_versionW[] =
- {'1','.','0',0};
-static const WCHAR bios_descriptionW[] =
- {'D','e','f','a','u','l','t',' ','S','y','s','t','e','m',' ','B','I','O','S',0};
-static const WCHAR bios_manufacturerW[] =
- {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
-static const WCHAR bios_releasedateW[] =
- {'2','0','1','2','0','6','0','8','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0};
-static const WCHAR bios_serialnumberW[] =
- {'0',0};
-static const WCHAR bios_smbiosbiosversionW[] =
- {'W','i','n','e',0};
-static const WCHAR bios_versionW[] =
- {'W','I','N','E',' ',' ',' ','-',' ','1',0};
-static const WCHAR cdromdrive_mediatypeW[] =
- {'C','D','-','R','O','M',0};
-static const WCHAR cdromdrive_nameW[] =
- {'W','i','n','e',' ','C','D','-','R','O','M',' ','A','T','A',' ','D','e','v','i','c','e',0};
-static const WCHAR cdromdrive_pnpdeviceidW[]=
- {'I','D','E','\\','C','D','R','O','M','W','I','N','E','_','C','D','-','R','O','M',
- '_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_','_',
- '_','_','_','_','_','_','_','1','.','0','_','_','_','_','_','\\','5','&','3','A','2',
- 'A','5','8','5','4','&','0','&','1','.','0','.','0',0};
-static const WCHAR compsys_descriptionW[] =
- {'A','T','/','A','T',' ','C','O','M','P','A','T','I','B','L','E',0};
-static const WCHAR compsys_domainW[] =
- {'W','O','R','K','G','R','O','U','P',0};
-static const WCHAR compsys_manufacturerW[] =
- {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
-static const WCHAR compsys_modelW[] =
- {'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[] =
- {'(','S','t','a','n','d','a','r','d',' ','d','i','s','k',' ','d','r','i','v','e','s',')',0};
-static const WCHAR diskdrive_mediatype_fixedW[] =
- {'F','i','x','e','d',' ','h','a','r','d',' ','d','i','s','k',0};
-static const WCHAR diskdrive_mediatype_removableW[] =
- {'R','e','m','o','v','a','b','l','e',' ','m','e','d','i','a',0};
-static const WCHAR diskdrive_modelW[] =
- {'W','i','n','e',' ','D','i','s','k',' ','D','r','i','v','e',0};
-static const WCHAR diskdrive_pnpdeviceidW[] =
- {'I','D','E','\\','D','i','s','k','\\','V','E','N','_','W','I','N','E',0};
-static const WCHAR diskdrive_serialW[] =
- {'W','I','N','E','H','D','I','S','K',0};
-static const WCHAR networkadapter_pnpdeviceidW[]=
- {'P','C','I','\\','V','E','N','_','8','0','8','6','&','D','E','V','_','1','0','0','E','&',
- 'S','U','B','S','Y','S','_','0','0','1','E','8','0','8','6','&','R','E','V','_','0','2','\\',
- '3','&','2','6','7','A','6','1','6','A','&','1','&','1','8',0};
-static const WCHAR os_32bitW[] =
- {'3','2','-','b','i','t',0};
-static const WCHAR os_64bitW[] =
- {'6','4','-','b','i','t',0};
-static const WCHAR os_installdateW[] =
- {'2','0','1','4','0','1','0','1','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0};
-static const WCHAR os_serialnumberW[] =
- {'1','2','3','4','5','-','O','E','M','-','1','2','3','4','5','6','7','-','1','2','3','4','5',0};
-static const WCHAR physicalmedia_tagW[] =
- {'\\','\\','.','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0',0};
-static const WCHAR quickfixengineering_captionW[] =
- {'h','t','t','p',':','/','/','w','i','n','e','h','q','.','o','r','g',0};
-static const WCHAR quickfixengineering_hotfixidW[] =
- {'K','B','1','2','3','4','5','6','7',0};
-static const WCHAR sounddevice_productnameW[] =
- {'W','i','n','e',' ','A','u','d','i','o',' ','D','e','v','i','c','e',0};
-static const WCHAR systemenclosure_systemenclosureW[] =
- {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',0};
-static const WCHAR systemenclosure_tagW[] =
- {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',' ','0',0};
-static const WCHAR systemenclosure_manufacturerW[] =
- {'W','i','n','e',0};
-static const WCHAR videocontroller_dactypeW[] =
- {'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};
-static const WCHAR winsat_timetakenW[] =
- {'M','o','s','t','R','e','c','e','n','t','A','s','s','e','s','s','m','e','n','t',0};
-
#include "pshpack1.h"
struct record_associator
{
@@ -1357,39 +821,39 @@ struct record_winsat
static const struct record_associator data_associator[] =
{
- { class_diskdrivetodiskpartitionW, class_diskpartitionW, class_diskdriveW },
- { class_logicaldisktopartitionW, class_logicaldiskW, class_diskpartitionW },
+ { L"Win32_DiskDriveToDiskPartition", L"Win32_DiskPartition", L"Win32_DiskDrive" },
+ { L"Win32_LogicalDiskToPartition", L"Win32_LogicalDisk", L"Win32_DiskPartition" },
};
static const struct record_param data_param[] =
{
- { class_processW, method_getownerW, -1, param_returnvalueW, CIM_UINT32 },
- { class_processW, method_getownerW, -1, param_userW, CIM_STRING },
- { class_processW, method_getownerW, -1, param_domainW, CIM_STRING },
- { class_serviceW, method_pauseserviceW, -1, param_returnvalueW, CIM_UINT32 },
- { class_serviceW, method_resumeserviceW, -1, param_returnvalueW, CIM_UINT32 },
- { class_serviceW, method_startserviceW, -1, param_returnvalueW, CIM_UINT32 },
- { class_serviceW, method_stopserviceW, -1, param_returnvalueW, CIM_UINT32 },
- { class_stdregprovW, method_createkeyW, 1, param_defkeyW, CIM_SINT32, 0x80000002 },
- { class_stdregprovW, method_createkeyW, 1, param_subkeynameW, CIM_STRING },
- { class_stdregprovW, method_createkeyW, -1, param_returnvalueW, CIM_UINT32 },
- { class_stdregprovW, method_enumkeyW, 1, param_defkeyW, CIM_SINT32, 0x80000002 },
- { class_stdregprovW, method_enumkeyW, 1, param_subkeynameW, CIM_STRING },
- { class_stdregprovW, method_enumkeyW, -1, param_returnvalueW, CIM_UINT32 },
- { class_stdregprovW, method_enumkeyW, -1, param_namesW, CIM_STRING|CIM_FLAG_ARRAY },
- { class_stdregprovW, method_enumvaluesW, 1, param_defkeyW, CIM_SINT32, 0x80000002 },
- { class_stdregprovW, method_enumvaluesW, 1, param_subkeynameW, CIM_STRING },
- { class_stdregprovW, method_enumvaluesW, -1, param_returnvalueW, CIM_UINT32 },
- { class_stdregprovW, method_enumvaluesW, -1, param_namesW, CIM_STRING|CIM_FLAG_ARRAY },
- { class_stdregprovW, method_enumvaluesW, -1, param_typesW, CIM_SINT32|CIM_FLAG_ARRAY },
- { class_stdregprovW, method_getstringvalueW, 1, param_defkeyW, CIM_SINT32, 0x80000002 },
- { class_stdregprovW, method_getstringvalueW, 1, param_subkeynameW, CIM_STRING },
- { class_stdregprovW, method_getstringvalueW, 1, param_valuenameW, CIM_STRING },
- { class_stdregprovW, method_getstringvalueW, -1, param_returnvalueW, CIM_UINT32 },
- { class_stdregprovW, method_getstringvalueW, -1, param_valueW, CIM_STRING },
- { class_systemsecurityW, method_getsdW, -1, param_returnvalueW, CIM_UINT32 },
- { class_systemsecurityW, method_getsdW, -1, param_sdW, CIM_UINT8|CIM_FLAG_ARRAY },
- { class_systemsecurityW, method_setsdW, 1, param_sdW, CIM_UINT8|CIM_FLAG_ARRAY },
- { class_systemsecurityW, method_setsdW, -1, param_returnvalueW, CIM_UINT32 },
+ { L"__SystemSecurity", L"GetSD", -1, L"ReturnValue", CIM_UINT32 },
+ { L"__SystemSecurity", L"GetSD", -1, L"SD", CIM_UINT8|CIM_FLAG_ARRAY },
+ { L"__SystemSecurity", L"SetSD", 1, L"SD", CIM_UINT8|CIM_FLAG_ARRAY },
+ { L"__SystemSecurity", L"SetSD", -1, L"ReturnValue", CIM_UINT32 },
+ { L"StdRegProv", L"CreateKey", 1, L"hDefKey", CIM_SINT32, 0x80000002 },
+ { L"StdRegProv", L"CreateKey", 1, L"sSubKeyName", CIM_STRING },
+ { L"StdRegProv", L"CreateKey", -1, L"ReturnValue", CIM_UINT32 },
+ { L"StdRegProv", L"EnumKey", 1, L"hDefKey", CIM_SINT32, 0x80000002 },
+ { L"StdRegProv", L"EnumKey", 1, L"sSubKeyName", CIM_STRING },
+ { L"StdRegProv", L"EnumKey", -1, L"ReturnValue", CIM_UINT32 },
+ { L"StdRegProv", L"EnumKey", -1, L"sNames", CIM_STRING|CIM_FLAG_ARRAY },
+ { L"StdRegProv", L"EnumValues", 1, L"hDefKey", CIM_SINT32, 0x80000002 },
+ { L"StdRegProv", L"EnumValues", 1, L"sSubKeyName", CIM_STRING },
+ { L"StdRegProv", L"EnumValues", -1, L"ReturnValue", CIM_UINT32 },
+ { L"StdRegProv", L"EnumValues", -1, L"sNames", CIM_STRING|CIM_FLAG_ARRAY },
+ { L"StdRegProv", L"EnumValues", -1, L"Types", CIM_SINT32|CIM_FLAG_ARRAY },
+ { L"StdRegProv", L"GetStringValue", 1, L"hDefKey", CIM_SINT32, 0x80000002 },
+ { L"StdRegProv", L"GetStringValue", 1, L"sSubKeyName", CIM_STRING },
+ { L"StdRegProv", L"GetStringValue", 1, L"sValueName", CIM_STRING },
+ { L"StdRegProv", L"GetStringValue", -1, L"ReturnValue", CIM_UINT32 },
+ { L"StdRegProv", L"GetStringValue", -1, L"sValue", CIM_STRING },
+ { L"Win32_Process", L"GetOwner", -1, L"ReturnValue", CIM_UINT32 },
+ { L"Win32_Process", L"GetOwner", -1, L"User", CIM_STRING },
+ { L"Win32_Process", L"GetOwner", -1, L"Domain", CIM_STRING },
+ { L"Win32_Service", L"PauseService", -1, L"ReturnValue", CIM_UINT32 },
+ { L"Win32_Service", L"ResumeService", -1, L"ReturnValue", CIM_UINT32 },
+ { L"Win32_Service", L"StartService", -1, L"ReturnValue", CIM_UINT32 },
+ { L"Win32_Service", L"StopService", -1, L"ReturnValue", CIM_UINT32 },
};
#define FLAVOR_ID (WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE | WBEM_FLAVOR_NOT_OVERRIDABLE |\
@@ -1397,20 +861,20 @@ static const struct record_param data_param[] =
static const struct record_physicalmedia data_physicalmedia[] =
{
- { diskdrive_serialW, physicalmedia_tagW }
+ { L"WINEHDISK", L"\\\\.\\PHYSICALDRIVE0" }
};
static const struct record_qualifier data_qualifier[] =
{
- { class_process_getowner_outW, param_userW, CIM_SINT32, FLAVOR_ID, prop_idW, 0 },
- { class_process_getowner_outW, param_domainW, CIM_SINT32, FLAVOR_ID, prop_idW, 1 }
+ { L"__WIN32_PROCESS_GETOWNER_OUT", L"User", CIM_SINT32, FLAVOR_ID, L"ID", 0 },
+ { L"__WIN32_PROCESS_GETOWNER_OUT", L"Domain", CIM_SINT32, FLAVOR_ID, L"ID", 1 }
};
static const struct record_quickfixengineering data_quickfixengineering[] =
{
- { quickfixengineering_captionW, quickfixengineering_hotfixidW },
+ { L"http://winehq.org", L"KB1234567" },
};
static const struct record_sounddevice data_sounddevice[] =
{
- { sounddevice_productnameW, sounddevice_productnameW, 3 /* enabled */ }
+ { L"Wine Audio Device", L"Wine Audio Device", 3 /* enabled */ }
};
static const struct record_stdregprov data_stdregprov[] =
{
@@ -1432,7 +896,7 @@ static const struct record_systemsecurity data_systemsecurity[] =
};
static const struct record_winsat data_winsat[] =
{
- { 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, winsat_timetakenW, 1 /* Valid */, 8.0f },
+ { 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, L"MostRecentAssessment", 1 /* Valid */, 8.0f },
};
/* check if row matches condition and update status */
@@ -1619,28 +1083,28 @@ static WCHAR *get_baseboard_string( BYTE id, const char *buf, UINT len )
static WCHAR *get_baseboard_manufacturer( const char *buf, UINT len )
{
WCHAR *ret = get_baseboard_string( 1, buf, len );
- if (!ret) return heap_strdupW( baseboard_manufacturerW );
+ if (!ret) return heap_strdupW( L"Intel Corporation" );
return ret;
}
static WCHAR *get_baseboard_product( const char *buf, UINT len )
{
WCHAR *ret = get_baseboard_string( 2, buf, len );
- if (!ret) return heap_strdupW( baseboard_tagW );
+ if (!ret) return heap_strdupW( L"Base Board" );
return ret;
}
static WCHAR *get_baseboard_serialnumber( const char *buf, UINT len )
{
WCHAR *ret = get_baseboard_string( 4, buf, len );
- if (!ret) return heap_strdupW( baseboard_serialnumberW );
+ if (!ret) return heap_strdupW( L"None" );
return ret;
}
static WCHAR *get_baseboard_version( const char *buf, UINT len )
{
WCHAR *ret = get_baseboard_string( 3, buf, len );
- if (!ret) return heap_strdupW( baseboard_versionW );
+ if (!ret) return heap_strdupW( L"1.0" );
return ret;
}
@@ -1659,11 +1123,11 @@ static enum fill_status fill_baseboard( struct table *table, const struct expr *
rec = (struct record_baseboard *)table->data;
rec->manufacturer = get_baseboard_manufacturer( buf, len );
- rec->model = baseboard_tagW;
- rec->name = baseboard_tagW;
+ rec->model = L"Base Board";
+ rec->name = L"Base Board";
rec->product = get_baseboard_product( buf, len );
rec->serialnumber = get_baseboard_serialnumber( buf, len );
- rec->tag = baseboard_tagW;
+ rec->tag = L"Base Board";
rec->version = get_baseboard_version( buf, len );
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
@@ -1705,14 +1169,13 @@ static WCHAR *get_bios_string( BYTE id, const char *buf, UINT len )
static WCHAR *get_bios_manufacturer( const char *buf, UINT len )
{
WCHAR *ret = get_bios_string( 1, buf, len );
- if (!ret) return heap_strdupW( bios_manufacturerW );
+ if (!ret) return heap_strdupW( L"The Wine Project" );
return ret;
}
static WCHAR *convert_bios_date( const WCHAR *str )
{
- static const WCHAR fmtW[] =
- {'%','0','4','u','%','0','2','u','%','0','2','u','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0};
+ static const WCHAR fmtW[] = L"%04u%02u%02u000000.000000+000";
UINT year, month, day, len = lstrlenW( str );
const WCHAR *p = str, *q;
WCHAR *ret;
@@ -1744,7 +1207,7 @@ static WCHAR *convert_bios_date( const WCHAR *str )
static WCHAR *get_bios_releasedate( const char *buf, UINT len )
{
WCHAR *ret, *date = get_bios_string( 3, buf, len );
- if (!date || !(ret = convert_bios_date( date ))) ret = heap_strdupW( bios_releasedateW );
+ if (!date || !(ret = convert_bios_date( date ))) ret = heap_strdupW( L"20120608000000.000000+000" );
heap_free( date );
return ret;
}
@@ -1752,7 +1215,7 @@ static WCHAR *get_bios_releasedate( const char *buf, UINT len )
static WCHAR *get_bios_smbiosbiosversion( const char *buf, UINT len )
{
WCHAR *ret = get_bios_string( 2, buf, len );
- if (!ret) return heap_strdupW( bios_smbiosbiosversionW );
+ if (!ret) return heap_strdupW( L"Wine" );
return ret;
}
@@ -1818,21 +1281,21 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond
GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_bios *)table->data;
- rec->currentlanguage = NULL;
- rec->description = bios_descriptionW;
- rec->ecmajorversion = get_bios_ec_firmware_major_release( buf, len );
- rec->ecminorversion = get_bios_ec_firmware_minor_release( buf, len );
- rec->identificationcode = NULL;
- rec->manufacturer = get_bios_manufacturer( buf, len );
- rec->name = bios_descriptionW;
- rec->releasedate = get_bios_releasedate( buf, len );
- rec->serialnumber = bios_serialnumberW;
- rec->smbiosbiosversion = get_bios_smbiosbiosversion( buf, len );
- rec->smbiosmajorversion = get_bios_smbiosmajorversion( buf, len );
- rec->smbiosminorversion = get_bios_smbiosminorversion( buf, len );
+ rec->currentlanguage = NULL;
+ rec->description = L"Default System BIOS";
+ rec->ecmajorversion = get_bios_ec_firmware_major_release( buf, len );
+ rec->ecminorversion = get_bios_ec_firmware_minor_release( buf, len );
+ rec->identificationcode = NULL;
+ rec->manufacturer = get_bios_manufacturer( buf, len );
+ rec->name = L"Default System BIOS";
+ rec->releasedate = get_bios_releasedate( buf, len );
+ rec->serialnumber = L"0";
+ rec->smbiosbiosversion = get_bios_smbiosbiosversion( buf, len );
+ rec->smbiosmajorversion = get_bios_smbiosmajorversion( buf, len );
+ rec->smbiosminorversion = get_bios_smbiosminorversion( buf, len );
rec->systembiosmajorversion = get_bios_system_bios_major_release( buf, len );
rec->systembiosminorversion = get_bios_system_bios_minor_release( buf, len );
- rec->version = bios_versionW;
+ rec->version = L"WINE - 1";
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
@@ -1845,7 +1308,6 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond
static enum fill_status fill_cdromdrive( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] = {'%','c',':',0};
WCHAR drive[3], root[] = {'A',':','\\',0};
struct record_cdromdrive *rec;
UINT i, row = 0, offset = 0;
@@ -1865,12 +1327,12 @@ static enum fill_status fill_cdromdrive( struct table *table, const struct expr
if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
rec = (struct record_cdromdrive *)(table->data + offset);
- rec->device_id = cdromdrive_pnpdeviceidW;
- swprintf( drive, ARRAY_SIZE( drive ), fmtW, 'A' + i );
+ rec->device_id = L"IDE\\CDROMWINE_CD-ROM_____________________________1.0_____\\5&3A2A5854&0&1.0.0";
+ swprintf( drive, ARRAY_SIZE( drive ), L"%c:", 'A' + i );
rec->drive = heap_strdupW( drive );
- rec->mediatype = cdromdrive_mediatypeW;
- rec->name = cdromdrive_nameW;
- rec->pnpdevice_id = cdromdrive_pnpdeviceidW;
+ rec->mediatype = L"CR-ROM";
+ rec->name = L"Wine CD_ROM ATA Device";
+ rec->pnpdevice_id = L"IDE\\CDROMWINE_CD-ROM_____________________________1.0_____\\5&3A2A5854&0&1.0.0";
if (!match_row( table, row, cond, &status ))
{
free_row_values( table, row );
@@ -1991,11 +1453,11 @@ static enum fill_status fill_compsys( struct table *table, const struct expr *co
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
rec = (struct record_computersystem *)table->data;
- rec->description = compsys_descriptionW;
- rec->domain = compsys_domainW;
+ rec->description = L"AT/AT COMPATIBLE";
+ rec->domain = L"WORKGROUP";
rec->domainrole = 0; /* standalone workstation */
- rec->manufacturer = compsys_manufacturerW;
- rec->model = compsys_modelW;
+ rec->manufacturer = L"The Wine Project";
+ rec->model = L"Wine";
rec->name = get_computername();
rec->num_logical_processors = get_logical_processor_count( NULL, &rec->num_processors );
rec->total_physical_memory = get_total_physical_memory();
@@ -2024,23 +1486,19 @@ static WCHAR *get_compsysproduct_string( BYTE id, const char *buf, UINT len )
static WCHAR *get_compsysproduct_identifyingnumber( const char *buf, UINT len )
{
WCHAR *ret = get_compsysproduct_string( 4, buf, len );
- if (!ret) return heap_strdupW( compsysproduct_identifyingnumberW );
+ if (!ret) return heap_strdupW( L"0" );
return ret;
}
static WCHAR *get_compsysproduct_name( const char *buf, UINT len )
{
WCHAR *ret = get_compsysproduct_string( 2, buf, len );
- if (!ret) return heap_strdupW( compsysproduct_nameW );
+ if (!ret) return heap_strdupW( L"Wine" );
return ret;
}
static WCHAR *get_compsysproduct_uuid( const char *buf, UINT len )
{
- static const WCHAR fmtW[] =
- {'%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','-',
- '%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X',
- '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X',0};
static const BYTE none[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
const struct smbios_header *hdr;
const struct smbios_system *system;
@@ -2052,25 +1510,25 @@ static WCHAR *get_compsysproduct_uuid( const char *buf, UINT len )
if (!memcmp( system->uuid, none, sizeof(none) ) || !(ret = heap_alloc( 37 * sizeof(WCHAR) ))) goto done;
ptr = system->uuid;
- swprintf( ret, 37, fmtW, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], ptr[8], ptr[9],
- ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15] );
-
+ swprintf( ret, 37, L"%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", ptr[0], ptr[1],
+ ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13],
+ ptr[14], ptr[15] );
done:
- if (!ret) ret = heap_strdupW( compsysproduct_uuidW );
+ if (!ret) ret = heap_strdupW( L"deaddead-dead-dead-dead-deaddeaddead" );
return ret;
}
static WCHAR *get_compsysproduct_vendor( const char *buf, UINT len )
{
WCHAR *ret = get_compsysproduct_string( 1, buf, len );
- if (!ret) return heap_strdupW( compsysproduct_vendorW );
+ if (!ret) return heap_strdupW( L"The Wine Project" );
return ret;
}
static WCHAR *get_compsysproduct_version( const char *buf, UINT len )
{
WCHAR *ret = get_compsysproduct_string( 3, buf, len );
- if (!ret) return heap_strdupW( compsysproduct_versionW );
+ if (!ret) return heap_strdupW( L"1.0" );
return ret;
}
@@ -2292,13 +1750,13 @@ static UINT seed_dirs( struct dirstack *dirstack, const struct expr *cond, WCHAR
const WCHAR *str = NULL;
if (left->type == EXPR_PROPVAL && right->type == EXPR_SVAL &&
- !wcscmp( left->u.propval->name, prop_nameW ) &&
+ !wcscmp( left->u.propval->name, L"Name" ) &&
towupper( right->u.sval[0] ) == towupper( root ))
{
str = right->u.sval;
}
else if (left->type == EXPR_SVAL && right->type == EXPR_PROPVAL &&
- !wcscmp( right->u.propval->name, prop_nameW ) &&
+ !wcscmp( right->u.propval->name, L"Name" ) &&
towupper( left->u.sval[0] ) == towupper( root ))
{
str = left->u.sval;
@@ -2348,9 +1806,8 @@ static WCHAR *append_path( const WCHAR *path, const WCHAR *segment, UINT *len )
static WCHAR *get_file_version( const WCHAR *filename )
{
- static const WCHAR slashW[] = {'\\',0}, fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
VS_FIXEDFILEINFO *info;
- DWORD size, len = 4 * 5 + ARRAY_SIZE( fmtW );
+ DWORD size, len = 4 * 5 + ARRAY_SIZE( L"%u.%u.%u.%u" );
void *block;
WCHAR *ret;
@@ -2361,21 +1818,20 @@ static WCHAR *get_file_version( const WCHAR *filename )
return NULL;
}
if (!GetFileVersionInfoW( filename, 0, size, block ) ||
- !VerQueryValueW( block, slashW, (void **)&info, &size ))
+ !VerQueryValueW( block, L"\\", (void **)&info, &size ))
{
heap_free( block );
heap_free( ret );
return NULL;
}
- swprintf( ret, len, fmtW, info->dwFileVersionMS >> 16, info->dwFileVersionMS & 0xffff,
- info->dwFileVersionLS >> 16, info->dwFileVersionLS & 0xffff );
+ swprintf( ret, len, L"%u.%u.%u.%u", info->dwFileVersionMS >> 16, info->dwFileVersionMS & 0xffff,
+ info->dwFileVersionLS >> 16, info->dwFileVersionLS & 0xffff );
heap_free( block );
return ret;
}
static enum fill_status fill_datafile( struct table *table, const struct expr *cond )
{
- static const WCHAR dotW[] = {'.',0}, dotdotW[] = {'.','.',0};
struct record_datafile *rec;
UINT i, len, row = 0, offset = 0, num_expected_rows;
WCHAR *glob = NULL, *path = NULL, *new_path, root[] = {'A',':','\\',0};
@@ -2419,7 +1875,7 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
FindClose( handle );
goto done;
}
- if (!wcscmp( data.cFileName, dotW ) || !wcscmp( data.cFileName, dotdotW )) continue;
+ if (!wcscmp( data.cFileName, L"." ) || !wcscmp( data.cFileName, L".." )) continue;
if (!(new_path = append_path( path, data.cFileName, &len )))
{
@@ -2504,7 +1960,6 @@ static enum fill_status fill_desktopmonitor( struct table *table, const struct e
static enum fill_status fill_directory( struct table *table, const struct expr *cond )
{
- static const WCHAR dotW[] = {'.',0}, dotdotW[] = {'.','.',0};
struct record_directory *rec;
UINT i, len, row = 0, offset = 0, num_expected_rows;
WCHAR *glob = NULL, *path = NULL, *new_path, root[] = {'A',':','\\',0};
@@ -2549,7 +2004,7 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
goto done;
}
if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
- !wcscmp( data.cFileName, dotW ) || !wcscmp( data.cFileName, dotdotW ))
+ !wcscmp( data.cFileName, L"." ) || !wcscmp( data.cFileName, L".." ))
continue;
if (!(new_path = append_path( path, data.cFileName, &len )))
@@ -2626,8 +2081,7 @@ static UINT64 get_freespace( const WCHAR *dir, UINT64 *disksize )
static enum fill_status fill_diskdrive( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] =
- {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','%','u',0};
+ static const WCHAR fmtW[] = L"\\\\\\\\.\\\\PHYSICALDRIVE%u";
WCHAR device_id[ARRAY_SIZE( fmtW ) + 10], root[] = {'A',':','\\',0};
struct record_diskdrive *rec;
UINT i, row = 0, offset = 0, index = 0, type;
@@ -2652,12 +2106,12 @@ static enum fill_status fill_diskdrive( struct table *table, const struct expr *
swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, index );
rec->device_id = heap_strdupW( device_id );
rec->index = index++;
- rec->interfacetype = diskdrive_interfacetypeW;
- rec->manufacturer = diskdrive_manufacturerW;
- rec->mediatype = (type == DRIVE_FIXED) ? diskdrive_mediatype_fixedW : diskdrive_mediatype_removableW;
- rec->model = diskdrive_modelW;
- rec->pnpdevice_id = diskdrive_pnpdeviceidW;
- rec->serialnumber = diskdrive_serialW;
+ rec->interfacetype = L"IDE";
+ rec->manufacturer = L"(Standard disk drives)";
+ rec->mediatype = (type == DRIVE_FIXED) ? L"Fixed hard disk" : L"Removable media";
+ rec->model = L"Wine Disk Drive";
+ rec->pnpdevice_id = L"IDE\\Disk\\VEN_WINE";
+ rec->serialnumber = L"WINEHDISK";
get_freespace( root, &size );
rec->size = size;
if (!match_row( table, row, cond, &status ))
@@ -2694,14 +2148,6 @@ static void free_associations( struct association *assoc, UINT count )
static struct association *get_diskdrivetodiskpartition_pairs( UINT *count )
{
- static const WCHAR pathW[] =
- {'_','_','P','A','T','H',0};
- static const WCHAR selectW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','i','s','k','D','r','i','v','e',0};
- static const WCHAR select2W[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','i','s','k','P','a','r','t','i','t','i','o','n',0};
struct association *ret = NULL;
struct query *query, *query2 = NULL;
VARIANT val;
@@ -2709,22 +2155,22 @@ static struct association *get_diskdrivetodiskpartition_pairs( UINT *count )
UINT i;
if (!(query = create_query())) return NULL;
- if ((hr = parse_query( selectW, &query->view, &query->mem )) != S_OK) goto done;
+ if ((hr = parse_query( L"SELECT * FROM Win32_DiskDrive", &query->view, &query->mem )) != S_OK) goto done;
if ((hr = execute_view( query->view )) != S_OK) goto done;
if (!(query2 = create_query())) return FALSE;
- if ((hr = parse_query( select2W, &query2->view, &query2->mem )) != S_OK) goto done;
+ if ((hr = parse_query( L"SELECT * FROM Win32_DiskPartition", &query2->view, &query2->mem )) != S_OK) goto done;
if ((hr = execute_view( query2->view )) != S_OK) goto done;
if (!(ret = heap_alloc_zero( query->view->result_count * sizeof(*ret) ))) goto done;
for (i = 0; i < query->view->result_count; i++)
{
- if ((hr = get_propval( query->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done;
+ if ((hr = get_propval( query->view, i, L"__PATH", &val, NULL, NULL )) != S_OK) goto done;
if (!(ret[i].ref = heap_strdupW( V_BSTR(&val) ))) goto done;
VariantClear( &val );
- if ((hr = get_propval( query2->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done;
+ if ((hr = get_propval( query2->view, i, L"__PATH", &val, NULL, NULL )) != S_OK) goto done;
if (!(ret[i].ref2 = heap_strdupW( V_BSTR(&val) ))) goto done;
VariantClear( &val );
}
@@ -2780,18 +2226,15 @@ static enum fill_status fill_diskdrivetodiskpartition( struct table *table, cons
static WCHAR *get_filesystem( const WCHAR *root )
{
- static const WCHAR ntfsW[] = {'N','T','F','S',0};
WCHAR buffer[MAX_PATH + 1];
if (GetVolumeInformationW( root, NULL, 0, NULL, NULL, NULL, buffer, MAX_PATH + 1 ))
return heap_strdupW( buffer );
- return heap_strdupW( ntfsW );
+ return heap_strdupW( L"NTFS" );
}
static enum fill_status fill_diskpartition( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] =
- {'D','i','s','k',' ','#','%','u',',',' ','P','a','r','t','i','t','i','o','n',' ','#','0',0};
WCHAR device_id[32], root[] = {'A',':','\\',0};
struct record_diskpartition *rec;
UINT i, row = 0, offset = 0, type, index = 0;
@@ -2815,7 +2258,7 @@ static enum fill_status fill_diskpartition( struct table *table, const struct ex
rec = (struct record_diskpartition *)(table->data + offset);
rec->bootable = (i == 2) ? -1 : 0;
rec->bootpartition = (i == 2) ? -1 : 0;
- swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, index );
+ swprintf( device_id, ARRAY_SIZE( device_id ), L"Disk #%u, Partition #0", index );
rec->device_id = heap_strdupW( device_id );
rec->diskindex = index++;
rec->index = 0;
@@ -2861,9 +2304,9 @@ static enum fill_status fill_displaycontrollerconfig( struct table *table, const
rec = (struct record_displaycontrollerconfig *)table->data;
rec->bitsperpixel = get_bitsperpixel( &hres, &vres );
- rec->caption = videocontroller_deviceidW;
+ rec->caption = L"VideoController1";
rec->horizontalresolution = hres;
- rec->name = videocontroller_deviceidW;
+ rec->name = L"VideoController1";
rec->verticalresolution = vres;
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
@@ -2875,12 +2318,11 @@ static enum fill_status fill_displaycontrollerconfig( struct table *table, const
static WCHAR *get_ip4_string( DWORD addr )
{
- static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
DWORD len = sizeof("ddd.ddd.ddd.ddd");
WCHAR *ret;
if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
- swprintf( ret, len, fmtW, (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff );
+ swprintf( ret, len, L"%u.%u.%u.%u", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff );
return ret;
}
@@ -2935,18 +2377,16 @@ static WCHAR *get_volumename( const WCHAR *root )
}
static WCHAR *get_volumeserialnumber( const WCHAR *root )
{
- static const WCHAR fmtW[] = {'%','0','8','X',0};
DWORD serial = 0;
WCHAR buffer[9];
GetVolumeInformationW( root, NULL, 0, &serial, NULL, NULL, NULL, 0 );
- swprintf( buffer, ARRAY_SIZE( buffer ), fmtW, serial );
+ swprintf( buffer, ARRAY_SIZE( buffer ), L"%08X", serial );
return heap_strdupW( buffer );
}
static enum fill_status fill_logicaldisk( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] = {'%','c',':',0};
WCHAR device_id[3], root[] = {'A',':','\\',0};
struct record_logicaldisk *rec;
UINT i, row = 0, offset = 0, type;
@@ -2968,7 +2408,7 @@ static enum fill_status fill_logicaldisk( struct table *table, const struct expr
if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
rec = (struct record_logicaldisk *)(table->data + offset);
- swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, 'A' + i );
+ swprintf( device_id, ARRAY_SIZE( device_id ), L"%c:", 'A' + i );
rec->device_id = heap_strdupW( device_id );
rec->drivetype = type;
rec->filesystem = get_filesystem( root );
@@ -2993,15 +2433,6 @@ static enum fill_status fill_logicaldisk( struct table *table, const struct expr
static struct association *get_logicaldisktopartition_pairs( UINT *count )
{
- static const WCHAR pathW[] =
- {'_','_','P','A','T','H',0};
- static const WCHAR selectW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'D','i','s','k','P','a','r','t','i','t','i','o','n',0};
- static const WCHAR select2W[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
- 'L','o','g','i','c','a','l','D','i','s','k',' ','W','H','E','R','E',' ',
- 'D','r','i','v','e','T','y','p','e','=','2',' ','O','R',' ','D','r','i','v','e','T','y','p','e','=','3',0};
struct association *ret = NULL;
struct query *query, *query2 = NULL;
VARIANT val;
@@ -3009,11 +2440,12 @@ static struct association *get_logicaldisktopartition_pairs( UINT *count )
UINT i;
if (!(query = create_query())) return NULL;
- if ((hr = parse_query( selectW, &query->view, &query->mem )) != S_OK) goto done;
+ if ((hr = parse_query( L"SELECT * FROM Win32_DiskPartition", &query->view, &query->mem )) != S_OK) goto done;
if ((hr = execute_view( query->view )) != S_OK) goto done;
if (!(query2 = create_query())) return FALSE;
- if ((hr = parse_query( select2W, &query2->view, &query2->mem )) != S_OK) goto done;
+ if ((hr = parse_query( L"SELECT * FROM Win32_LogicalDisk WHERE DriveType=2 OR DriveType=3", &query2->view,
+ &query2->mem )) != S_OK) goto done;
if ((hr = execute_view( query2->view )) != S_OK) goto done;
if (!(ret = heap_alloc_zero( query->view->result_count * sizeof(*ret) ))) goto done;
@@ -3021,11 +2453,11 @@ static struct association *get_logicaldisktopartition_pairs( UINT *count )
/* assume fixed and removable disks are enumerated in the same order as partitions */
for (i = 0; i < query->view->result_count; i++)
{
- if ((hr = get_propval( query->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done;
+ if ((hr = get_propval( query->view, i, L"__PATH", &val, NULL, NULL )) != S_OK) goto done;
if (!(ret[i].ref = heap_strdupW( V_BSTR(&val) ))) goto done;
VariantClear( &val );
- if ((hr = get_propval( query2->view, i, pathW, &val, NULL, NULL )) != S_OK) goto done;
+ if ((hr = get_propval( query2->view, i, L"__PATH", &val, NULL, NULL )) != S_OK) goto done;
if (!(ret[i].ref2 = heap_strdupW( V_BSTR(&val) ))) goto done;
VariantClear( &val );
}
@@ -3095,40 +2527,35 @@ static UINT16 get_connection_status( IF_OPER_STATUS status )
}
static WCHAR *get_mac_address( const BYTE *addr, DWORD len )
{
- static const WCHAR fmtW[] =
- {'%','0','2','x',':','%','0','2','x',':','%','0','2','x',':',
- '%','0','2','x',':','%','0','2','x',':','%','0','2','x',0};
WCHAR *ret;
-
if (len != 6 || !(ret = heap_alloc( 18 * sizeof(WCHAR) ))) return NULL;
- swprintf( ret, 18, fmtW, addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] );
+ swprintf( ret, 18, L"%02x:%02x:%02x:%02x:%02x:%02x", addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] );
return ret;
}
static const WCHAR *get_adaptertype( DWORD type, int *id, int *physical )
{
- static const WCHAR ethernetW[] = {'E','t','h','e','r','n','e','t',' ','8','0','2','.','3',0};
- static const WCHAR wirelessW[] = {'W','i','r','e','l','e','s','s',0};
- static const WCHAR firewireW[] = {'1','3','9','4',0};
- static const WCHAR tunnelW[] = {'T','u','n','n','e','l',0};
-
switch (type)
{
case IF_TYPE_ETHERNET_CSMACD:
*id = 0;
*physical = -1;
- return ethernetW;
+ return L"Ethernet 802.3";
+
case IF_TYPE_IEEE80211:
*id = 9;
*physical = -1;
- return wirelessW;
+ return L"Wireless";
+
case IF_TYPE_IEEE1394:
*id = 13;
*physical = -1;
- return firewireW;
+ return L"1394";
+
case IF_TYPE_TUNNEL:
*id = 15;
*physical = 0;
- return tunnelW;
+ return L"Tunnel";
+
default:
*id = -1;
*physical = 0;
@@ -3138,7 +2565,6 @@ static const WCHAR *get_adaptertype( DWORD type, int *id, int *physical )
static enum fill_status fill_networkadapter( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] = {'%','u',0};
WCHAR device_id[11];
struct record_networkadapter *rec;
IP_ADAPTER_ADDRESSES *aa, *buffer;
@@ -3170,7 +2596,7 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
rec = (struct record_networkadapter *)(table->data + offset);
- swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, aa->u.s.IfIndex );
+ swprintf( device_id, ARRAY_SIZE( device_id ), L"%u", aa->u.s.IfIndex );
rec->adaptertype = get_adaptertype( aa->IfType, &adaptertypeid, &physical );
rec->adaptertypeid = adaptertypeid;
rec->description = heap_strdupW( aa->Description );
@@ -3178,11 +2604,11 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
rec->index = aa->u.s.IfIndex;
rec->interface_index = aa->u.s.IfIndex;
rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
- rec->manufacturer = compsys_manufacturerW;
+ rec->manufacturer = L"The Wine Project";
rec->name = heap_strdupW( aa->FriendlyName );
rec->netconnection_status = get_connection_status( aa->OperStatus );
rec->physicaladapter = physical;
- rec->pnpdevice_id = networkadapter_pnpdeviceidW;
+ rec->pnpdevice_id = L"PCI\\VEN_8086&DEV_100E&SUBSYS_001E8086&REV_02\\3&267A616A&1&18";
rec->speed = 1000000;
if (!match_row( table, row, cond, &status ))
{
@@ -3343,10 +2769,8 @@ static struct array *get_ipsubnet( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
}
else
{
- static const WCHAR fmtW[] = {'%','u',0};
WCHAR buf[11];
-
- swprintf( buf, ARRAY_SIZE( buf ), fmtW, address->OnLinkPrefixLength );
+ swprintf( buf, ARRAY_SIZE( buf ), L"%u", address->OnLinkPrefixLength );
ptr[i] = heap_strdupW( buf );
}
if (!ptr[i++])
@@ -3434,7 +2858,6 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
static enum fill_status fill_physicalmemory( struct table *table, const struct expr *cond )
{
- static const WCHAR dimm0W[] = {'D','I','M','M',' ','0',0};
struct record_physicalmemory *rec;
enum fill_status status = FILL_STATUS_UNFILTERED;
UINT row = 0;
@@ -3444,7 +2867,7 @@ static enum fill_status fill_physicalmemory( struct table *table, const struct e
rec = (struct record_physicalmemory *)table->data;
rec->capacity = get_total_physical_memory();
rec->configuredclockspeed = 0;
- rec->devicelocator = dimm0W;
+ rec->devicelocator = L"DIMM 0";
rec->formfactor = 8; /* DIMM */
rec->memorytype = 9; /* RAM */
rec->partnumber = NULL;
@@ -3505,7 +2928,6 @@ static enum fill_status fill_pnpentity( struct table *table, const struct expr *
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;
@@ -3531,7 +2953,7 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co
{
rec = (struct record_printer *)(table->data + offset);
rec->attributes = info[i].Attributes;
- swprintf( id, ARRAY_SIZE( id ), fmtW, i );
+ swprintf( id, ARRAY_SIZE( id ), L"Printer%u", i );
rec->device_id = heap_strdupW( id );
rec->drivername = heap_strdupW( info[i].pDriverName );
rec->horizontalresolution = info[i].pDevMode->u1.s1.dmPrintQuality;
@@ -3563,7 +2985,6 @@ static WCHAR *get_cmdline( DWORD process_id )
static enum fill_status fill_process( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] = {'%','u',0};
WCHAR handle[11];
struct record_process *rec;
PROCESSENTRY32W entry;
@@ -3590,7 +3011,7 @@ static enum fill_status fill_process( struct table *table, const struct expr *co
rec->caption = heap_strdupW( entry.szExeFile );
rec->commandline = get_cmdline( entry.th32ProcessID );
rec->description = heap_strdupW( entry.szExeFile );
- swprintf( handle, ARRAY_SIZE( handle ), fmtW, entry.th32ProcessID );
+ swprintf( handle, ARRAY_SIZE( handle ), L"%u", entry.th32ProcessID );
rec->handle = heap_strdupW( handle );
rec->name = heap_strdupW( entry.szExeFile );
rec->process_id = entry.th32ProcessID;
@@ -3693,42 +3114,33 @@ static const WCHAR *get_osarchitecture(void)
{
SYSTEM_INFO info;
GetNativeSystemInfo( &info );
- if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return os_64bitW;
- return os_32bitW;
+ if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return L"64-bit";
+ return L"32-bit";
}
static void get_processor_caption( WCHAR *caption, UINT len )
{
- static const WCHAR fmtW[] =
- {'%','s',' ','F','a','m','i','l','y',' ','%','u',' ',
- 'M','o','d','e','l',' ','%','u',' ','S','t','e','p','p','i','n','g',' ','%','u',0};
- static const WCHAR x86W[] = {'x','8','6',0};
- static const WCHAR intel64W[] = {'I','n','t','e','l','6','4',0};
- static const WCHAR amd64W[] = {'A','M','D','6','4',0};
- static const WCHAR authenticamdW[] = {'A','u','t','h','e','n','t','i','c','A','M','D',0};
const WCHAR *arch;
WCHAR manufacturer[13];
unsigned int regs[4] = {0, 0, 0, 0}, family, model, stepping;
get_processor_manufacturer( manufacturer, ARRAY_SIZE( manufacturer ) );
- if (get_osarchitecture() == os_32bitW) arch = x86W;
- else if (!wcscmp( manufacturer, authenticamdW )) arch = amd64W;
- else arch = intel64W;
+ if (!wcscmp( get_osarchitecture(), L"32-bit" )) arch = L"x86";
+ else if (!wcscmp( manufacturer, L"AuthenticAMD" )) arch = L"AMD64";
+ else arch = L"Intel64";
do_cpuid( 1, regs );
model = get_processor_model( regs[0], &stepping, &family );
- swprintf( caption, len, fmtW, arch, family, model, stepping );
+ swprintf( caption, len, L"%s Family %u Model %u Stepping %u", arch, family, model, stepping );
}
static void get_processor_version( WCHAR *version, UINT len )
{
- static const WCHAR fmtW[] =
- {'M','o','d','e','l',' ','%','u',',',' ','S','t','e','p','p','i','n','g',' ','%','u',0};
unsigned int regs[4] = {0, 0, 0, 0}, model, stepping;
do_cpuid( 1, regs );
model = get_processor_model( regs[0], &stepping, NULL );
- swprintf( version, len, fmtW, model, stepping );
+ swprintf( version, len, L"Model %u Stepping %u", model, stepping );
}
static UINT16 get_processor_revision(void)
{
@@ -3738,11 +3150,10 @@ static UINT16 get_processor_revision(void)
}
static void get_processor_id( WCHAR *processor_id, UINT len )
{
- static const WCHAR fmtW[] = {'%','0','8','X','%','0','8','X',0};
unsigned int regs[4] = {0, 0, 0, 0};
do_cpuid( 1, regs );
- swprintf( processor_id, len, fmtW, regs[3], regs[0] );
+ swprintf( processor_id, len, L"%08X%08X", regs[3], regs[0] );
}
static void get_processor_name( WCHAR *name )
{
@@ -3792,7 +3203,6 @@ static UINT get_processor_maxclockspeed( UINT index )
static enum fill_status fill_processor( struct table *table, const struct expr *cond )
{
- static const WCHAR fmtW[] = {'C','P','U','%','u',0};
WCHAR caption[100], device_id[14], processor_id[17], manufacturer[13], name[49] = {0}, version[50];
struct record_processor *rec;
UINT i, offset = 0, num_rows = 0, num_logical, num_physical, num_packages;
@@ -3811,14 +3221,14 @@ static enum fill_status fill_processor( struct table *table, const struct expr *
for (i = 0; i < num_packages; i++)
{
rec = (struct record_processor *)(table->data + offset);
- rec->addresswidth = get_osarchitecture() == os_32bitW ? 32 : 64;
- rec->architecture = get_osarchitecture() == os_32bitW ? 0 : 9;
+ rec->addresswidth = !wcscmp( get_osarchitecture(), L"32-bit" ) ? 32 : 64;
+ rec->architecture = !wcscmp( get_osarchitecture(), L"32-bit" ) ? 0 : 9;
rec->caption = heap_strdupW( caption );
rec->cpu_status = 1; /* CPU Enabled */
rec->currentclockspeed = get_processor_currentclockspeed( i );
- rec->datawidth = get_osarchitecture() == os_32bitW ? 32 : 64;
+ rec->datawidth = !wcscmp( get_osarchitecture(), L"32-bit" ) ? 32 : 64;
rec->description = heap_strdupW( caption );
- swprintf( device_id, ARRAY_SIZE( device_id ), fmtW, i );
+ swprintf( device_id, ARRAY_SIZE( device_id ), L"CPU%u", i );
rec->device_id = heap_strdupW( device_id );
rec->family = 2; /* Unknown */
rec->level = 15;
@@ -3848,9 +3258,6 @@ static enum fill_status fill_processor( struct table *table, const struct expr *
static WCHAR *get_lastbootuptime(void)
{
- static const WCHAR fmtW[] =
- {'%','0','4','u','%','0','2','u','%','0','2','u','%','0','2','u','%','0','2','u','%','0','2','u',
- '.','%','0','6','u','+','0','0','0',0};
SYSTEM_TIMEOFDAY_INFORMATION ti;
TIME_FIELDS tf;
WCHAR *ret;
@@ -3859,14 +3266,12 @@ static WCHAR *get_lastbootuptime(void)
NtQuerySystemInformation( SystemTimeOfDayInformation, &ti, sizeof(ti), NULL );
RtlTimeToTimeFields( &ti.liKeBootTime, &tf );
- swprintf( ret, 26, fmtW, tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute, tf.Second, tf.Milliseconds * 1000 );
+ swprintf( ret, 26, L"%04u%02u%02u%02u%02u%02u.%06u+000", tf.Year, tf.Month, tf.Day, tf.Hour, tf.Minute,
+ tf.Second, tf.Milliseconds * 1000 );
return ret;
}
static WCHAR *get_localdatetime(void)
{
- static const WCHAR fmtW[] =
- {'%','0','4','u','%','0','2','u','%','0','2','u','%','0','2','u','%','0','2','u','%','0','2','u',
- '.','%','0','6','u','%','+','0','3','d',0};
TIME_ZONE_INFORMATION tzi;
SYSTEMTIME st;
WCHAR *ret;
@@ -3884,7 +3289,8 @@ static WCHAR *get_localdatetime(void)
if (!(ret = heap_alloc( 26 * sizeof(WCHAR) ))) return NULL;
GetLocalTime(&st);
- swprintf( ret, 26, fmtW, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds * 1000, -Bias );
+ swprintf( ret, 26, L"%04u%02u%02u%02u%02u%02u.%06u%+03d", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute,
+ st.wSecond, st.wMilliseconds * 1000, -Bias );
return ret;
}
static WCHAR *get_systemdirectory(void)
@@ -3901,15 +3307,14 @@ static WCHAR *get_systemdirectory(void)
static WCHAR *get_systemdrive(void)
{
WCHAR *ret = heap_alloc( 3 * sizeof(WCHAR) ); /* "c:" */
- if (ret && GetEnvironmentVariableW( prop_systemdriveW, ret, 3 )) return ret;
+ if (ret && GetEnvironmentVariableW( L"SystemDrive", ret, 3 )) return ret;
heap_free( ret );
return NULL;
}
static WCHAR *get_codeset(void)
{
- static const WCHAR fmtW[] = {'%','u',0};
WCHAR *ret = heap_alloc( 11 * sizeof(WCHAR) );
- if (ret) swprintf( ret, 11, fmtW, GetACP() );
+ if (ret) swprintf( ret, 11, L"%u", GetACP() );
return ret;
}
static WCHAR *get_countrycode(void)
@@ -3926,38 +3331,25 @@ static WCHAR *get_locale(void)
}
static WCHAR *get_osbuildnumber( OSVERSIONINFOEXW *ver )
{
- static const WCHAR fmtW[] = {'%','u',0};
WCHAR *ret = heap_alloc( 11 * sizeof(WCHAR) );
- if (ret) swprintf( ret, 11, fmtW, ver->dwBuildNumber );
+ if (ret) swprintf( ret, 11, L"%u", ver->dwBuildNumber );
return ret;
}
static WCHAR *get_oscaption( OSVERSIONINFOEXW *ver )
{
- static const WCHAR windowsW[] =
- {'M','i','c','r','o','s','o','f','t',' ','W','i','n','d','o','w','s',' '};
- static const WCHAR win2000W[] =
- {'2','0','0','0',' ','P','r','o','f','e','s','s','i','o','n','a','l',0};
- static const WCHAR win2003W[] =
- {'S','e','r','v','e','r',' ','2','0','0','3',' ','S','t','a','n','d','a','r','d',' ','E','d','i','t','i','o','n',0};
- static const WCHAR winxpW[] =
- {'X','P',' ','P','r','o','f','e','s','s','i','o','n','a','l',0};
- static const WCHAR winxp64W[] =
- {'X','P',' ','P','r','o','f','e','s','s','i','o','n','a','l',' ','x','6','4',' ','E','d','i','t','i','o','n',0};
- static const WCHAR vistaW[] =
- {'V','i','s','t','a',' ','U','l','t','i','m','a','t','e',0};
- static const WCHAR win2008W[] =
- {'S','e','r','v','e','r',' ','2','0','0','8',' ','S','t','a','n','d','a','r','d',0};
- static const WCHAR win7W[] =
- {'7',' ','P','r','o','f','e','s','s','i','o','n','a','l',0};
- static const WCHAR win2008r2W[] =
- {'S','e','r','v','e','r',' ','2','0','0','8',' ','R','2',' ','S','t','a','n','d','a','r','d',0};
- static const WCHAR win8W[] =
- {'8',' ','P','r','o',0};
- static const WCHAR win81W[] =
- {'8','.','1',' ','P','r','o',0};
- static const WCHAR win10W[] =
- {'1','0',' ','P','r','o',0};
- int len = ARRAY_SIZE( windowsW );
+ static const WCHAR windowsW[] = L"Microsoft Windows ";
+ static const WCHAR win2000W[] = L"2000 Professional";
+ static const WCHAR win2003W[] = L"Server 2003 Standard Edition";
+ static const WCHAR winxpW[] = L"XP Professional";
+ static const WCHAR winxp64W[] = L"XP Professional x64 Edition";
+ static const WCHAR vistaW[] = L"Vista Ultimate";
+ static const WCHAR win2008W[] = L"Server 2008 Standard";
+ static const WCHAR win7W[] = L"7 Professional";
+ static const WCHAR win2008r2W[] = L"Server 2008 R2 Standard";
+ static const WCHAR win8W[] = L"8 Pro";
+ static const WCHAR win81W[] = L"8.1 Pro";
+ static const WCHAR win10W[] = L"10 Pro";
+ int len = ARRAY_SIZE( windowsW ) - 1;
WCHAR *ret;
if (!(ret = heap_alloc( len * sizeof(WCHAR) + sizeof(win2003W) ))) return NULL;
@@ -3986,9 +3378,7 @@ static WCHAR *get_oscaption( OSVERSIONINFOEXW *ver )
}
static WCHAR *get_osname( const WCHAR *caption )
{
- static const WCHAR partitionW[] =
- {'|','C',':','\\','W','I','N','D','O','W','S','|','\\','D','e','v','i','c','e','\\',
- 'H','a','r','d','d','i','s','k','0','\\','P','a','r','t','i','t','i','o','n','1',0};
+ static const WCHAR partitionW[] = L"|C:\\WINDOWS|\\Device\\Harddisk0\\Partition1";
int len = lstrlenW( caption );
WCHAR *ret;
@@ -3999,9 +3389,8 @@ static WCHAR *get_osname( const WCHAR *caption )
}
static WCHAR *get_osversion( OSVERSIONINFOEXW *ver )
{
- static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u',0};
WCHAR *ret = heap_alloc( 33 * sizeof(WCHAR) );
- if (ret) swprintf( ret, 33, fmtW, ver->dwMajorVersion, ver->dwMinorVersion, ver->dwBuildNumber );
+ if (ret) swprintf( ret, 33, L"%u.%u.%u", ver->dwMajorVersion, ver->dwMinorVersion, ver->dwBuildNumber );
return ret;
}
static DWORD get_operatingsystemsku(void)
@@ -4021,7 +3410,6 @@ static INT16 get_currenttimezone(void)
static enum fill_status fill_operatingsystem( struct table *table, const struct expr *cond )
{
- static const WCHAR wineprojectW[] = {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
struct record_operatingsystem *rec;
enum fill_status status = FILL_STATUS_UNFILTERED;
OSVERSIONINFOEXW ver;
@@ -4041,11 +3429,11 @@ static enum fill_status fill_operatingsystem( struct table *table, const struct
rec->csname = get_computername();
rec->currenttimezone = get_currenttimezone();
rec->freephysicalmemory = get_available_physical_memory() / 1024;
- rec->installdate = os_installdateW;
+ rec->installdate = L"20140101000000.000000+000";
rec->lastbootuptime = get_lastbootuptime();
rec->localdatetime = get_localdatetime();
rec->locale = get_locale();
- rec->manufacturer = wineprojectW;
+ rec->manufacturer = L"The Wine Project";
rec->name = get_osname( rec->caption );
rec->operatingsystemsku = get_operatingsystemsku();
rec->osarchitecture = get_osarchitecture();
@@ -4053,7 +3441,7 @@ static enum fill_status fill_operatingsystem( struct table *table, const struct
rec->osproductsuite = 2461140; /* Windows XP Professional */
rec->ostype = 18; /* WINNT */
rec->primary = -1;
- rec->serialnumber = os_serialnumberW;
+ rec->serialnumber = L"12345-OEM-1234567-12345";
rec->servicepackmajor = ver.wServicePackMajor;
rec->servicepackminor = ver.wServicePackMinor;
rec->suitemask = 272; /* Single User + Terminal */
@@ -4072,65 +3460,38 @@ static enum fill_status fill_operatingsystem( struct table *table, const struct
static const WCHAR *get_service_type( DWORD type )
{
- static const WCHAR filesystem_driverW[] =
- {'F','i','l','e',' ','S','y','s','t','e','m',' ','D','r','i','v','e','r',0};
- static const WCHAR kernel_driverW[] =
- {'K','e','r','n','e','l',' ','D','r','i','v','e','r',0};
- static const WCHAR own_processW[] =
- {'O','w','n',' ','P','r','o','c','e','s','s',0};
- static const WCHAR share_processW[] =
- {'S','h','a','r','e',' ','P','r','o','c','e','s','s',0};
-
- if (type & SERVICE_KERNEL_DRIVER) return kernel_driverW;
- else if (type & SERVICE_FILE_SYSTEM_DRIVER) return filesystem_driverW;
- else if (type & SERVICE_WIN32_OWN_PROCESS) return own_processW;
- else if (type & SERVICE_WIN32_SHARE_PROCESS) return share_processW;
+ if (type & SERVICE_KERNEL_DRIVER) return L"Kernel Driver";
+ else if (type & SERVICE_FILE_SYSTEM_DRIVER) return L"File System Driver";
+ else if (type & SERVICE_WIN32_OWN_PROCESS) return L"Own Process";
+ else if (type & SERVICE_WIN32_SHARE_PROCESS) return L"Share Process";
else ERR("unhandled type 0x%08x\n", type);
return NULL;
}
static const WCHAR *get_service_state( DWORD state )
{
- static const WCHAR runningW[] =
- {'R','u','n','n','i','n','g',0};
- static const WCHAR start_pendingW[] =
- {'S','t','a','r','t',' ','P','e','n','d','i','n','g',0};
- static const WCHAR stop_pendingW[] =
- {'S','t','o','p',' ','P','e','n','d','i','n','g',0};
- static const WCHAR stoppedW[] =
- {'S','t','o','p','p','e','d',0};
- static const WCHAR unknownW[] =
- {'U','n','k','n','o','w','n',0};
-
switch (state)
{
- case SERVICE_STOPPED: return stoppedW;
- case SERVICE_START_PENDING: return start_pendingW;
- case SERVICE_STOP_PENDING: return stop_pendingW;
- case SERVICE_RUNNING: return runningW;
+ case SERVICE_STOPPED: return L"Stopped";
+ case SERVICE_START_PENDING: return L"Start Pending";
+ case SERVICE_STOP_PENDING: return L"Stop Pending";
+ case SERVICE_RUNNING: return L"Running";
default:
ERR("unknown state %u\n", state);
- return unknownW;
+ return L"Unknown";
}
}
static const WCHAR *get_service_startmode( DWORD mode )
{
- static const WCHAR bootW[] = {'B','o','o','t',0};
- static const WCHAR systemW[] = {'S','y','s','t','e','m',0};
- static const WCHAR autoW[] = {'A','u','t','o',0};
- static const WCHAR manualW[] = {'M','a','n','u','a','l',0};
- static const WCHAR disabledW[] = {'D','i','s','a','b','l','e','d',0};
- static const WCHAR unknownW[] = {'U','n','k','n','o','w','n',0};
-
switch (mode)
{
- case SERVICE_BOOT_START: return bootW;
- case SERVICE_SYSTEM_START: return systemW;
- case SERVICE_AUTO_START: return autoW;
- case SERVICE_DEMAND_START: return manualW;
- case SERVICE_DISABLED: return disabledW;
+ case SERVICE_BOOT_START: return L"Boot";
+ case SERVICE_SYSTEM_START: return L"System";
+ case SERVICE_AUTO_START: return L"Auto";
+ case SERVICE_DEMAND_START: return L"Manual";
+ case SERVICE_DISABLED: return L"Disabled";
default:
ERR("unknown mode 0x%x\n", mode);
- return unknownW;
+ return L"Unknown";
}
}
static QUERY_SERVICE_CONFIGW *query_service_config( SC_HANDLE manager, const WCHAR *name )
@@ -4262,11 +3623,11 @@ static const WCHAR *find_sid_str( const struct expr *cond )
left = cond->u.expr.left;
right = cond->u.expr.right;
- if (left->type == EXPR_PROPVAL && right->type == EXPR_SVAL && !wcsicmp( left->u.propval->name, prop_sidW ))
+ if (left->type == EXPR_PROPVAL && right->type == EXPR_SVAL && !wcsicmp( left->u.propval->name, L"SID" ))
{
ret = right->u.sval;
}
- else if (left->type == EXPR_SVAL && right->type == EXPR_PROPVAL && !wcsicmp( right->u.propval->name, prop_sidW ))
+ else if (left->type == EXPR_SVAL && right->type == EXPR_PROPVAL && !wcsicmp( right->u.propval->name, L"SID" ))
{
ret = left->u.sval;
}
@@ -4337,7 +3698,7 @@ static WCHAR *get_systemenclosure_string( BYTE id, const char *buf, UINT len )
static WCHAR *get_systemenclosure_manufacturer( const char *buf, UINT len )
{
WCHAR *ret = get_systemenclosure_string( 1, buf, len );
- if (!ret) return heap_strdupW( systemenclosure_manufacturerW );
+ if (!ret) return heap_strdupW( L"Wine" );
return ret;
}
@@ -4408,13 +3769,13 @@ static enum fill_status fill_systemenclosure( struct table *table, const struct
GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_systemenclosure *)table->data;
- rec->caption = systemenclosure_systemenclosureW;
+ rec->caption = L"System Enclosure";
rec->chassistypes = get_systemenclosure_chassistypes( buf, len );
- rec->description = systemenclosure_systemenclosureW;
+ rec->description = L"System Enclosure";
rec->lockpresent = get_systemenclosure_lockpresent( buf, len );
rec->manufacturer = get_systemenclosure_manufacturer( buf, len );
- rec->name = systemenclosure_systemenclosureW;
- rec->tag = systemenclosure_tagW;
+ rec->name = L"System Enclosure";
+ rec->tag = L"System Enclosure 0";
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
@@ -4427,10 +3788,7 @@ static enum fill_status fill_systemenclosure( struct table *table, const struct
static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc )
{
- static const WCHAR fmtW[] =
- {'P','C','I','\\','V','E','N','_','%','0','4','X','&','D','E','V','_','%','0','4','X',
- '&','S','U','B','S','Y','S','_','%','0','8','X','&','R','E','V','_','%','0','2','X','\\',
- '0','&','D','E','A','D','B','E','E','F','&','0','&','D','E','A','D',0};
+ static const WCHAR *fmtW = L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X\\0&DEADBEEF&0&DEAD";
UINT len = sizeof(fmtW) + 2;
WCHAR *ret;
@@ -4446,32 +3804,23 @@ static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc )
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 cannot 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;
+ if (vendorid == HW_VENDOR_AMD) return L"aticfx32.dll";
+ else if (vendorid == HW_VENDOR_NVIDIA) return L"nvd3dum.dll";
+ else if (vendorid == HW_VENDOR_INTEL) return L"igdudim32.dll";
+ return L"wine.dll";
}
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};
struct record_videocontroller *rec;
HRESULT hr;
IDXGIFactory *factory = NULL;
IDXGIAdapter *adapter = NULL;
DXGI_ADAPTER_DESC desc;
UINT row = 0, hres = 1024, vres = 768, vidmem = 512 * 1024 * 1024;
- const WCHAR *name = videocontroller_deviceidW;
+ const WCHAR *name = L"VideoController1";
enum fill_status status = FILL_STATUS_UNFILTERED;
WCHAR mode[44];
@@ -4493,7 +3842,7 @@ static enum fill_status fill_videocontroller( struct table *table, const struct
done:
rec = (struct record_videocontroller *)table->data;
- rec->adapter_dactype = videocontroller_dactypeW;
+ rec->adapter_dactype = L"Integrated RAMDAC";
rec->adapter_ram = vidmem;
rec->availability = 3; /* Running or Full Power */
rec->config_errorcode = 0; /* no error */
@@ -4504,16 +3853,16 @@ done:
rec->current_scanmode = 2; /* Unknown */
rec->current_verticalres = vres;
rec->description = heap_strdupW( name );
- rec->device_id = videocontroller_deviceidW;
- rec->driverdate = videocontroller_driverdateW;
- rec->driverversion = videocontroller_driverversionW;
+ rec->device_id = L"VideoController1";
+ rec->driverdate = L"20170101000000.000000+000";
+ rec->driverversion = L"1.0";
rec->installeddriver = get_installeddriver( desc.VendorId );
rec->name = heap_strdupW( name );
rec->pnpdevice_id = get_pnpdeviceid( &desc );
- rec->status = videocontroller_statusW;
+ rec->status = L"OK";
rec->videoarchitecture = 2; /* Unknown */
rec->videomemorytype = 2; /* Unknown */
- swprintf( mode, ARRAY_SIZE( mode ), fmtW, hres, vres, (UINT64)1 << rec->current_bitsperpixel );
+ swprintf( mode, ARRAY_SIZE( mode ), L"%u x %u x %I64u colors", hres, vres, (UINT64)1 << rec->current_bitsperpixel );
rec->videomodedescription = heap_strdupW( mode );
rec->videoprocessor = heap_strdupW( name );
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
@@ -4531,44 +3880,44 @@ done:
#define D(d) sizeof(d)/sizeof(d[0]), 0, (BYTE *)d
static struct table builtin_classes[] =
{
- { class_associatorsW, C(col_associator), D(data_associator) },
- { class_baseboardW, C(col_baseboard), 0, 0, NULL, fill_baseboard },
- { class_biosW, C(col_bios), 0, 0, NULL, fill_bios },
- { class_cdromdriveW, C(col_cdromdrive), 0, 0, NULL, fill_cdromdrive },
- { class_compsysW, C(col_compsys), 0, 0, NULL, fill_compsys },
- { class_compsysproductW, C(col_compsysproduct), 0, 0, NULL, fill_compsysproduct },
- { class_datafileW, C(col_datafile), 0, 0, NULL, fill_datafile },
- { class_desktopmonitorW, C(col_desktopmonitor), 0, 0, NULL, fill_desktopmonitor },
- { class_directoryW, C(col_directory), 0, 0, NULL, fill_directory },
- { class_diskdriveW, C(col_diskdrive), 0, 0, NULL, fill_diskdrive },
- { class_diskdrivetodiskpartitionW, C(col_diskdrivetodiskpartition), 0, 0, NULL, fill_diskdrivetodiskpartition },
- { class_diskpartitionW, C(col_diskpartition), 0, 0, NULL, fill_diskpartition },
- { class_displaycontrollerconfigW, C(col_displaycontrollerconfig), 0, 0, NULL, fill_displaycontrollerconfig },
- { class_ip4routetableW, C(col_ip4routetable), 0, 0, NULL, fill_ip4routetable },
- { class_logicaldiskW, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
- { class_logicaldisk2W, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
- { class_logicaldisktopartitionW, C(col_logicaldisktopartition), 0, 0, NULL, fill_logicaldisktopartition },
- { class_networkadapterW, C(col_networkadapter), 0, 0, NULL, fill_networkadapter },
- { class_networkadapterconfigW, C(col_networkadapterconfig), 0, 0, NULL, fill_networkadapterconfig },
- { class_operatingsystemW, C(col_operatingsystem), 0, 0, NULL, fill_operatingsystem },
- { class_paramsW, C(col_param), D(data_param) },
- { class_physicalmediaW, C(col_physicalmedia), D(data_physicalmedia) },
- { class_physicalmemoryW, C(col_physicalmemory), 0, 0, NULL, fill_physicalmemory },
- { class_pnpentityW, C(col_pnpentity), 0, 0, NULL, fill_pnpentity },
- { class_printerW, C(col_printer), 0, 0, NULL, fill_printer },
- { class_processW, C(col_process), 0, 0, NULL, fill_process },
- { class_processorW, C(col_processor), 0, 0, NULL, fill_processor },
- { class_processor2W, C(col_processor), 0, 0, NULL, fill_processor },
- { class_qualifiersW, C(col_qualifier), D(data_qualifier) },
- { class_quickfixengineeringW, C(col_quickfixengineering), D(data_quickfixengineering) },
- { class_serviceW, C(col_service), 0, 0, NULL, fill_service },
- { class_sidW, C(col_sid), 0, 0, NULL, fill_sid },
- { class_sounddeviceW, C(col_sounddevice), D(data_sounddevice) },
- { class_stdregprovW, C(col_stdregprov), D(data_stdregprov) },
- { class_systemsecurityW, C(col_systemsecurity), D(data_systemsecurity) },
- { class_systemenclosureW, C(col_systemenclosure), 0, 0, NULL, fill_systemenclosure },
- { class_videocontrollerW, C(col_videocontroller), 0, 0, NULL, fill_videocontroller },
- { class_winsatW, C(col_winsat), D(data_winsat) },
+ { L"__ASSOCIATORS", C(col_associator), D(data_associator) },
+ { L"__PARAMETERS", C(col_param), D(data_param) },
+ { L"__QUALIFIERS", C(col_qualifier), D(data_qualifier) },
+ { L"__SystemSecurity", C(col_systemsecurity), D(data_systemsecurity) },
+ { L"CIM_DataFile", C(col_datafile), 0, 0, NULL, fill_datafile },
+ { L"CIM_LogicalDisk", C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
+ { L"CIM_Processor", C(col_processor), 0, 0, NULL, fill_processor },
+ { L"StdRegProv", C(col_stdregprov), D(data_stdregprov) },
+ { L"Win32_BIOS", C(col_bios), 0, 0, NULL, fill_bios },
+ { L"Win32_BaseBoard", C(col_baseboard), 0, 0, NULL, fill_baseboard },
+ { L"Win32_CDROMDrive", C(col_cdromdrive), 0, 0, NULL, fill_cdromdrive },
+ { L"Win32_ComputerSystem", C(col_compsys), 0, 0, NULL, fill_compsys },
+ { L"Win32_ComputerSystemProduct", C(col_compsysproduct), 0, 0, NULL, fill_compsysproduct },
+ { L"Win32_DesktopMonitor", C(col_desktopmonitor), 0, 0, NULL, fill_desktopmonitor },
+ { L"Win32_Directory", C(col_directory), 0, 0, NULL, fill_directory },
+ { L"Win32_DiskDrive", C(col_diskdrive), 0, 0, NULL, fill_diskdrive },
+ { L"Win32_DiskDriveToDiskPartition", C(col_diskdrivetodiskpartition), 0, 0, NULL, fill_diskdrivetodiskpartition },
+ { L"Win32_DiskPartition", C(col_diskpartition), 0, 0, NULL, fill_diskpartition },
+ { L"Win32_DisplayControllerConfiguration", C(col_displaycontrollerconfig), 0, 0, NULL, fill_displaycontrollerconfig },
+ { L"Win32_IP4RouteTable", C(col_ip4routetable), 0, 0, NULL, fill_ip4routetable },
+ { L"Win32_LogicalDisk", C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
+ { L"Win32_LogicalDiskToPartition", C(col_logicaldisktopartition), 0, 0, NULL, fill_logicaldisktopartition },
+ { L"Win32_NetworkAdapter", C(col_networkadapter), 0, 0, NULL, fill_networkadapter },
+ { L"Win32_NetworkAdapterConfiguration", C(col_networkadapterconfig), 0, 0, NULL, fill_networkadapterconfig },
+ { L"Win32_OperatingSystem", C(col_operatingsystem), 0, 0, NULL, fill_operatingsystem },
+ { L"Win32_PhysicalMedia", C(col_physicalmedia), D(data_physicalmedia) },
+ { L"Win32_PhysicalMemory", C(col_physicalmemory), 0, 0, NULL, fill_physicalmemory },
+ { L"Win32_PnPEntity", C(col_pnpentity), 0, 0, NULL, fill_pnpentity },
+ { L"Win32_Printer", C(col_printer), 0, 0, NULL, fill_printer },
+ { L"Win32_Process", C(col_process), 0, 0, NULL, fill_process },
+ { L"Win32_Processor", C(col_processor), 0, 0, NULL, fill_processor },
+ { L"Win32_QuickFixEngineering", C(col_quickfixengineering), D(data_quickfixengineering) },
+ { L"Win32_SID", C(col_sid), 0, 0, NULL, fill_sid },
+ { L"Win32_Service", C(col_service), 0, 0, NULL, fill_service },
+ { L"Win32_SoundDevice", C(col_sounddevice), D(data_sounddevice) },
+ { L"Win32_SystemEnclosure", C(col_systemenclosure), 0, 0, NULL, fill_systemenclosure },
+ { L"Win32_VideoController", C(col_videocontroller), 0, 0, NULL, fill_videocontroller },
+ { L"Win32_WinSAT", C(col_winsat), D(data_winsat) },
};
#undef C
#undef D
diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c
index 3ee5771e6b..ba7720b098 100644
--- a/dlls/wbemprox/class.c
+++ b/dlls/wbemprox/class.c
@@ -577,7 +577,6 @@ static HRESULT WINAPI class_object_Clone(
static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
{
- static const WCHAR fmtW[] = {'\n','\t','%','s',' ','=',' ','%','s',';',0};
BSTR value, ret;
WCHAR *p;
UINT i;
@@ -587,7 +586,7 @@ static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
{
if ((value = get_value_bstr( table, row, i )))
{
- *len += ARRAY_SIZE( fmtW );
+ *len += ARRAY_SIZE( L"\n\t%s = %s;" );
*len += lstrlenW( table->columns[i].name );
*len += SysStringLen( value );
SysFreeString( value );
@@ -599,7 +598,7 @@ static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
{
if ((value = get_value_bstr( table, row, i )))
{
- p += swprintf( p, *len - (p - ret), fmtW, table->columns[i].name, value );
+ p += swprintf( p, *len - (p - ret), L"\n\t%s = %s;", table->columns[i].name, value );
SysFreeString( value );
}
}
@@ -608,19 +607,17 @@ static BSTR get_body_text( const struct table *table, UINT row, UINT *len )
static BSTR get_object_text( const struct view *view, UINT index )
{
- static const WCHAR fmtW[] =
- {'\n','i','n','s','t','a','n','c','e',' ','o','f',' ','%','s','\n','{','%','s','\n','}',';',0};
UINT len, len_body, row = view->result[index];
struct table *table = get_view_table( view, index );
BSTR ret, body;
- len = ARRAY_SIZE( fmtW );
+ len = ARRAY_SIZE( L"\ninstance of %s\n{%s\n};" );
len += lstrlenW( table->name );
if (!(body = get_body_text( table, row, &len_body ))) return NULL;
len += len_body;
if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
- swprintf( ret, len, fmtW, table->name, body );
+ swprintf( ret, len, L"\ninstance of %s\n{%s\n};", table->name, body );
SysFreeString( body );
return ret;
}
@@ -729,9 +726,6 @@ static void set_default_value( CIMTYPE type, UINT val, BYTE *ptr )
static HRESULT create_signature_columns_and_data( IEnumWbemClassObject *iter, UINT *num_cols,
struct column **cols, BYTE **data )
{
- static const WCHAR parameterW[] = {'P','a','r','a','m','e','t','e','r',0};
- static const WCHAR typeW[] = {'T','y','p','e',0};
- static const WCHAR defaultvalueW[] = {'D','e','f','a','u','l','t','V','a','l','u','e',0};
struct column *columns;
BYTE *row;
IWbemClassObject *param;
@@ -750,16 +744,16 @@ static HRESULT create_signature_columns_and_data( IEnumWbemClassObject *iter, UI
IEnumWbemClassObject_Next( iter, WBEM_INFINITE, 1, ¶m, &count );
if (!count) break;
- hr = IWbemClassObject_Get( param, parameterW, 0, &val, NULL, NULL );
+ hr = IWbemClassObject_Get( param, L"Parameter", 0, &val, NULL, NULL );
if (hr != S_OK) goto error;
columns[i].name = heap_strdupW( V_BSTR( &val ) );
VariantClear( &val );
- hr = IWbemClassObject_Get( param, typeW, 0, &val, NULL, NULL );
+ hr = IWbemClassObject_Get( param, L"Type", 0, &val, NULL, NULL );
if (hr != S_OK) goto error;
columns[i].type = V_UI4( &val );
- hr = IWbemClassObject_Get( param, defaultvalueW, 0, &val, NULL, NULL );
+ hr = IWbemClassObject_Get( param, L"DefaultValue", 0, &val, NULL, NULL );
if (hr != S_OK) goto error;
if (V_UI4( &val )) set_default_value( columns[i].type, V_UI4( &val ), row + offset );
offset += get_type_size( columns[i].type );
@@ -802,36 +796,26 @@ static HRESULT create_signature_table( IEnumWbemClassObject *iter, WCHAR *name )
static WCHAR *build_signature_table_name( const WCHAR *class, const WCHAR *method, enum param_direction dir )
{
- static const WCHAR fmtW[] = {'_','_','%','s','_','%','s','_','%','s',0};
- static const WCHAR outW[] = {'O','U','T',0};
- static const WCHAR inW[] = {'I','N',0};
- UINT len = ARRAY_SIZE(fmtW) + ARRAY_SIZE(outW) + lstrlenW( class ) + lstrlenW( method );
+ UINT len = ARRAY_SIZE(L"__%s_%s_%s") + ARRAY_SIZE(L"OUT") + lstrlenW( class ) + lstrlenW( method );
WCHAR *ret;
if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
- swprintf( ret, len, fmtW, class, method, dir == PARAM_IN ? inW : outW );
+ swprintf( ret, len, L"__%s_%s_%s", class, method, dir == PARAM_IN ? L"IN" : L"OUT" );
return wcsupr( ret );
}
HRESULT create_signature( const WCHAR *class, const WCHAR *method, enum param_direction dir,
IWbemClassObject **sig )
{
- static const WCHAR selectW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
- '_','_','P','A','R','A','M','E','T','E','R','S',' ','W','H','E','R','E',' ',
- 'C','l','a','s','s','=','\'','%','s','\'',' ','A','N','D',' ',
- 'M','e','t','h','o','d','=','\'','%','s','\'',' ','A','N','D',' ',
- 'D','i','r','e','c','t','i','o','n','%','s',0};
- static const WCHAR geW[] = {'>','=','0',0};
- static const WCHAR leW[] = {'<','=','0',0};
- UINT len = ARRAY_SIZE(selectW) + ARRAY_SIZE(geW);
+ static const WCHAR selectW[] = L"SELECT * FROM __PARAMETERS WHERE Class='%s' AND Method='%s' AND Direction%s";
+ UINT len = ARRAY_SIZE(selectW) + ARRAY_SIZE(L">=0");
IEnumWbemClassObject *iter;
WCHAR *query, *name;
HRESULT hr;
len += lstrlenW( class ) + lstrlenW( method );
if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
- swprintf( query, len, selectW, class, method, dir >= 0 ? geW : leW );
+ swprintf( query, len, selectW, class, method, dir >= 0 ? L">=0" : L"<=0" );
hr = exec_query( query, &iter );
heap_free( query );
diff --git a/dlls/wbemprox/process.c b/dlls/wbemprox/process.c
index de9b03f708..0ee81e8b52 100644
--- a/dlls/wbemprox/process.c
+++ b/dlls/wbemprox/process.c
@@ -70,7 +70,7 @@ HRESULT process_get_owner( IWbemClassObject *obj, IWbemClassObject *in, IWbemCla
TRACE("%p, %p, %p\n", obj, in, out);
- hr = create_signature( class_processW, method_getownerW, PARAM_OUT, &sig );
+ hr = create_signature( L"Win32_Process", L"GetOwner", PARAM_OUT, &sig );
if (hr != S_OK) return hr;
if (out)
@@ -90,12 +90,12 @@ HRESULT process_get_owner( IWbemClassObject *obj, IWbemClassObject *in, IWbemCla
{
if (!V_UI4( &retval ))
{
- hr = IWbemClassObject_Put( out_params, param_userW, 0, &user, CIM_STRING );
+ hr = IWbemClassObject_Put( out_params, L"User", 0, &user, CIM_STRING );
if (hr != S_OK) goto done;
- hr = IWbemClassObject_Put( out_params, param_domainW, 0, &domain, CIM_STRING );
+ hr = IWbemClassObject_Put( out_params, L"Domain", 0, &domain, CIM_STRING );
if (hr != S_OK) goto done;
}
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
}
done:
diff --git a/dlls/wbemprox/qualifier.c b/dlls/wbemprox/qualifier.c
index d29abd3f38..1cc4087ff3 100644
--- a/dlls/wbemprox/qualifier.c
+++ b/dlls/wbemprox/qualifier.c
@@ -92,19 +92,9 @@ static HRESULT WINAPI qualifier_set_QueryInterface(
static HRESULT create_qualifier_enum( const WCHAR *class, const WCHAR *member, const WCHAR *name,
IEnumWbemClassObject **iter )
{
- static const WCHAR fmtW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','_','_','Q','U','A','L',
- 'I','F','I','E','R','S',' ','W','H','E','R','E',' ','C','l','a','s','s','=',
- '\'','%','s','\'',' ','A','N','D',' ','M','e','m','b','e','r','=','\'','%','s','\'',' ',
- 'A','N','D',' ','N','a','m','e','=','\'','%','s','\'',0};
- static const WCHAR fmt2W[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','_','_','Q','U','A','L',
- 'I','F','I','E','R','S',' ','W','H','E','R','E',' ','C','l','a','s','s','=',
- '\'','%','s','\'',' ','A','N','D',' ','M','e','m','b','e','r','=','\'','%','s','\'',0};
- static const WCHAR fmt3W[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','_','_','Q','U','A','L',
- 'I','F','I','E','R','S',' ','W','H','E','R','E',' ','C','l','a','s','s','=',
- '\'','%','s','\'',0};
+ static const WCHAR fmtW[] = L"SELECT * FROM __QUALIFIERS WHERE Class='%s' AND Member='%s' AND Name='%s'";
+ static const WCHAR fmt2W[] = L"SELECT * FROM __QUALIFIERS WHERE Class='%s' AND Member='%s'";
+ static const WCHAR fmt3W[] = L"SELECT * FROM __QUALIFIERS WHERE Class='%s'";
WCHAR *query;
HRESULT hr;
int len;
@@ -136,11 +126,6 @@ static HRESULT create_qualifier_enum( const WCHAR *class, const WCHAR *member, c
static HRESULT get_qualifier_value( const WCHAR *class, const WCHAR *member, const WCHAR *name,
VARIANT *val, LONG *flavor )
{
- static const WCHAR intvalueW[] = {'I','n','t','e','g','e','r','V','a','l','u','e',0};
- static const WCHAR strvalueW[] = {'S','t','r','i','n','g','V','a','l','u','e',0};
- static const WCHAR boolvalueW[] = {'B','o','o','l','V','a','l','u','e',0};
- static const WCHAR flavorW[] = {'F','l','a','v','o','r',0};
- static const WCHAR typeW[] = {'T','y','p','e',0};
IEnumWbemClassObject *iter;
IWbemClassObject *obj;
VARIANT var;
@@ -155,22 +140,22 @@ static HRESULT get_qualifier_value( const WCHAR *class, const WCHAR *member, con
if (flavor)
{
- hr = IWbemClassObject_Get( obj, flavorW, 0, &var, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Flavor", 0, &var, NULL, NULL );
if (hr != S_OK) goto done;
*flavor = V_I4( &var );
}
- hr = IWbemClassObject_Get( obj, typeW, 0, &var, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Type", 0, &var, NULL, NULL );
if (hr != S_OK) goto done;
switch (V_UI4( &var ))
{
case CIM_STRING:
- hr = IWbemClassObject_Get( obj, strvalueW, 0, val, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"StringValue", 0, val, NULL, NULL );
break;
case CIM_SINT32:
- hr = IWbemClassObject_Get( obj, intvalueW, 0, val, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"IntegerValue", 0, val, NULL, NULL );
break;
case CIM_BOOLEAN:
- hr = IWbemClassObject_Get( obj, boolvalueW, 0, val, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"BoolValue", 0, val, NULL, NULL );
break;
default:
ERR("unhandled type %u\n", V_UI4( &var ));
diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c
index f46dcd922f..6ac5ad5b77 100644
--- a/dlls/wbemprox/query.c
+++ b/dlls/wbemprox/query.c
@@ -180,10 +180,8 @@ static inline BOOL is_boolcmp( const struct complex_expr *expr, UINT ltype, UINT
static HRESULT eval_boolcmp( UINT op, LONGLONG lval, LONGLONG rval, UINT ltype, UINT rtype, LONGLONG *val )
{
- static const WCHAR trueW[] = {'T','r','u','e',0};
-
- if (ltype == CIM_STRING) lval = !wcsicmp( (const WCHAR *)(INT_PTR)lval, trueW ) ? -1 : 0;
- else if (rtype == CIM_STRING) rval = !wcsicmp( (const WCHAR *)(INT_PTR)rval, trueW ) ? -1 : 0;
+ if (ltype == CIM_STRING) lval = !wcsicmp( (const WCHAR *)(INT_PTR)lval, L"True" ) ? -1 : 0;
+ else if (rtype == CIM_STRING) rval = !wcsicmp( (const WCHAR *)(INT_PTR)rval, L"True" ) ? -1 : 0;
switch (op)
{
@@ -276,31 +274,26 @@ static UINT resolve_type( UINT left, UINT right )
static const WCHAR *format_int( WCHAR *buf, UINT len, CIMTYPE type, LONGLONG val )
{
- static const WCHAR fmt_signedW[] = {'%','d',0};
- static const WCHAR fmt_unsignedW[] = {'%','u',0};
- static const WCHAR fmt_signed64W[] = {'%','I','6','4','d',0};
- static const WCHAR fmt_unsigned64W[] = {'%','I','6','4','u',0};
-
switch (type)
{
case CIM_SINT8:
case CIM_SINT16:
case CIM_SINT32:
- swprintf( buf, len, fmt_signedW, val );
+ swprintf( buf, len, L"%d", val );
return buf;
case CIM_UINT8:
case CIM_UINT16:
case CIM_UINT32:
- swprintf( buf, len, fmt_unsignedW, val );
+ swprintf( buf, len, L"%u", val );
return buf;
case CIM_SINT64:
- wsprintfW( buf, fmt_signed64W, val );
+ wsprintfW( buf, L"%I64d", val );
return buf;
case CIM_UINT64:
- wsprintfW( buf, fmt_unsigned64W, val );
+ wsprintfW( buf, L"%I64u", val );
return buf;
default:
@@ -477,9 +470,7 @@ HRESULT eval_cond( const struct table *table, UINT row, const struct expr *cond,
static WCHAR *build_assoc_query( const WCHAR *class, UINT class_len )
{
- static const WCHAR fmtW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','_','_','A','S','S','O','C','I','A','T','O','R','S',
- ' ','W','H','E','R','E',' ','C','l','a','s','s','=','\'','%','s','\'',0};
+ static const WCHAR fmtW[] = L"SELECT * FROM __ASSOCIATORS WHERE Class='%s'";
UINT len = class_len + ARRAY_SIZE(fmtW);
WCHAR *ret;
@@ -501,9 +492,7 @@ static HRESULT create_assoc_enum( const WCHAR *class, UINT class_len, IEnumWbemC
static WCHAR *build_antecedent_query( const WCHAR *assocclass, const WCHAR *dependent )
{
- static const WCHAR fmtW[] =
- {'S','E','L','E','C','T',' ','A','n','t','e','c','e','d','e','n','t',' ','F','R','O','M',' ','%','s',' ',
- 'W','H','E','R','E',' ','D','e','p','e','n','d','e','n','t','=','\'','%','s','\'',0};
+ static const WCHAR fmtW[] = L"SELECT Antecedent FROM %s WHERE Dependent='%s'";
UINT len = lstrlenW(assocclass) + lstrlenW(dependent) + ARRAY_SIZE(fmtW);
WCHAR *ret;
@@ -524,13 +513,11 @@ static BSTR build_servername(void)
static BSTR build_namespace(void)
{
- static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
- return SysAllocString( cimv2W );
+ return SysAllocString( L"ROOT\\CIMV2" );
}
static WCHAR *build_canonical_path( const WCHAR *relpath )
{
- static const WCHAR fmtW[] = {'\\','\\','%','s','\\','%','s',':',0};
BSTR server, namespace;
WCHAR *ret;
UINT len, i;
@@ -542,10 +529,10 @@ static WCHAR *build_canonical_path( const WCHAR *relpath )
return NULL;
}
- len = ARRAY_SIZE( fmtW ) + SysStringLen( server ) + SysStringLen( namespace ) + lstrlenW( relpath );
+ len = ARRAY_SIZE( L"\\\\%s\\%s:" ) + SysStringLen( server ) + SysStringLen( namespace ) + lstrlenW( relpath );
if ((ret = heap_alloc( len * sizeof(WCHAR ) )))
{
- len = swprintf( ret, len, fmtW, server, namespace );
+ len = swprintf( ret, len, L"\\\\%s\\%s:", server, namespace );
for (i = 0; i < lstrlenW( relpath ); i ++)
{
if (relpath[i] == '\'') ret[len++] = '"';
@@ -561,7 +548,6 @@ static WCHAR *build_canonical_path( const WCHAR *relpath )
static HRESULT get_antecedent( const WCHAR *assocclass, const WCHAR *dependent, BSTR *ret )
{
- static const WCHAR antecedentW[] = {'A','n','t','e','c','e','d','e','n','t',0};
WCHAR *fullpath, *str;
IEnumWbemClassObject *iter = NULL;
IWbemClassObject *obj;
@@ -580,7 +566,7 @@ static HRESULT get_antecedent( const WCHAR *assocclass, const WCHAR *dependent,
goto done;
}
- hr = IWbemClassObject_Get( obj, antecedentW, 0, &var, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Antecedent", 0, &var, NULL, NULL );
IWbemClassObject_Release( obj );
if (hr != S_OK) goto done;
*ret = V_BSTR( &var );
@@ -642,7 +628,6 @@ done:
static HRESULT exec_assoc_view( struct view *view )
{
- static const WCHAR assocclassW[] = {'A','s','s','o','c','C','l','a','s','s',0};
IEnumWbemClassObject *iter = NULL;
struct path *path;
HRESULT hr;
@@ -661,7 +646,7 @@ static HRESULT exec_assoc_view( struct view *view )
IEnumWbemClassObject_Next( iter, WBEM_INFINITE, 1, &obj, &count );
if (!count) break;
- if ((hr = IWbemClassObject_Get( obj, assocclassW, 0, &var, NULL, NULL )) != S_OK)
+ if ((hr = IWbemClassObject_Get( obj, L"AssocClass", 0, &var, NULL, NULL )) != S_OK)
{
IWbemClassObject_Release( obj );
goto done;
@@ -817,7 +802,6 @@ static BOOL is_system_prop( const WCHAR *name )
static BSTR build_proplist( const struct table *table, UINT row, UINT count, UINT *len )
{
- static const WCHAR fmtW[] = {'%','s','=','%','s',0};
UINT i, j, offset;
BSTR *values, ret = NULL;
@@ -830,7 +814,7 @@ static BSTR build_proplist( const struct table *table, UINT row, UINT count, UIN
{
const WCHAR *name = table->columns[i].name;
values[j] = get_value_bstr( table, row, i );
- *len += lstrlenW( fmtW ) + lstrlenW( name ) + lstrlenW( values[j] );
+ *len += lstrlenW( L"%s=%s" ) + lstrlenW( name ) + lstrlenW( values[j] );
j++;
}
}
@@ -842,7 +826,7 @@ static BSTR build_proplist( const struct table *table, UINT row, UINT count, UIN
if (table->columns[i].type & COL_FLAG_KEY)
{
const WCHAR *name = table->columns[i].name;
- offset += swprintf( ret + offset, *len - offset, fmtW, name, values[j] );
+ offset += swprintf( ret + offset, *len - offset, L"%s=%s", name, values[j] );
if (j < count - 1) ret[offset++] = ',';
j++;
}
@@ -866,7 +850,6 @@ static UINT count_key_columns( const struct table *table )
static BSTR build_relpath( const struct view *view, UINT table_index, UINT result_index, const WCHAR *name )
{
- static const WCHAR fmtW[] = {'%','s','.','%','s',0};
BSTR class, proplist, ret = NULL;
struct table *table = view->table[table_index];
UINT row = view->result[result_index];
@@ -878,9 +861,9 @@ static BSTR build_relpath( const struct view *view, UINT table_index, UINT resul
if (!(num_keys = count_key_columns( table ))) return class;
if (!(proplist = build_proplist( table, row, num_keys, &len ))) goto done;
- len += lstrlenW( fmtW ) + SysStringLen( class );
+ len += lstrlenW( L"%s.%s" ) + SysStringLen( class );
if (!(ret = SysAllocStringLen( NULL, len ))) goto done;
- swprintf( ret, len, fmtW, class, proplist );
+ swprintf( ret, len, L"%s.%s", class, proplist );
done:
SysFreeString( class );
@@ -890,7 +873,6 @@ done:
static BSTR build_path( const struct view *view, UINT table_index, UINT result_index, const WCHAR *name )
{
- static const WCHAR fmtW[] = {'\\','\\','%','s','\\','%','s',':','%','s',0};
BSTR server, namespace = NULL, relpath = NULL, ret = NULL;
UINT len;
@@ -900,9 +882,9 @@ static BSTR build_path( const struct view *view, UINT table_index, UINT result_i
if (!(namespace = build_namespace())) goto done;
if (!(relpath = build_relpath( view, table_index, result_index, name ))) goto done;
- len = lstrlenW( fmtW ) + SysStringLen( server ) + SysStringLen( namespace ) + SysStringLen( relpath );
+ len = lstrlenW( L"\\\\%s\\%s:%s" ) + SysStringLen( server ) + SysStringLen( namespace ) + SysStringLen( relpath );
if (!(ret = SysAllocStringLen( NULL, len ))) goto done;
- swprintf( ret, len, fmtW, server, namespace, relpath );
+ swprintf( ret, len, L"\\\\%s\\%s:%s", server, namespace, relpath );
done:
SysFreeString( server );
@@ -942,17 +924,9 @@ static UINT count_result_properties( const struct view *view, UINT table_index )
static HRESULT get_system_propval( const struct view *view, UINT table_index, UINT result_index, const WCHAR *name,
VARIANT *ret, CIMTYPE *type, LONG *flavor )
{
- static const WCHAR classW[] = {'_','_','C','L','A','S','S',0};
- static const WCHAR genusW[] = {'_','_','G','E','N','U','S',0};
- static const WCHAR pathW[] = {'_','_','P','A','T','H',0};
- static const WCHAR namespaceW[] = {'_','_','N','A','M','E','S','P','A','C','E',0};
- static const WCHAR propcountW[] = {'_','_','P','R','O','P','E','R','T','Y','_','C','O','U','N','T',0};
- static const WCHAR relpathW[] = {'_','_','R','E','L','P','A','T','H',0};
- static const WCHAR serverW[] = {'_','_','S','E','R','V','E','R',0};
-
if (flavor) *flavor = WBEM_FLAVOR_ORIGIN_SYSTEM;
- if (!wcsicmp( name, classW ))
+ if (!wcsicmp( name, L"__CLASS" ))
{
if (ret)
{
@@ -962,7 +936,7 @@ static HRESULT get_system_propval( const struct view *view, UINT table_index, UI
if (type) *type = CIM_STRING;
return S_OK;
}
- if (!wcsicmp( name, genusW ))
+ if (!wcsicmp( name, L"__GENUS" ))
{
if (ret)
{
@@ -972,7 +946,7 @@ static HRESULT get_system_propval( const struct view *view, UINT table_index, UI
if (type) *type = CIM_SINT32;
return S_OK;
}
- else if (!wcsicmp( name, namespaceW ))
+ else if (!wcsicmp( name, L"__NAMESPACE" ))
{
if (ret)
{
@@ -982,7 +956,7 @@ static HRESULT get_system_propval( const struct view *view, UINT table_index, UI
if (type) *type = CIM_STRING;
return S_OK;
}
- else if (!wcsicmp( name, pathW ))
+ else if (!wcsicmp( name, L"__PATH" ))
{
if (ret)
{
@@ -992,7 +966,7 @@ static HRESULT get_system_propval( const struct view *view, UINT table_index, UI
if (type) *type = CIM_STRING;
return S_OK;
}
- if (!wcsicmp( name, propcountW ))
+ if (!wcsicmp( name, L"__PROPERTY_COUNT" ))
{
if (ret)
{
@@ -1002,7 +976,7 @@ static HRESULT get_system_propval( const struct view *view, UINT table_index, UI
if (type) *type = CIM_SINT32;
return S_OK;
}
- else if (!wcsicmp( name, relpathW ))
+ else if (!wcsicmp( name, L"__RELPATH" ))
{
if (ret)
{
@@ -1012,7 +986,7 @@ static HRESULT get_system_propval( const struct view *view, UINT table_index, UI
if (type) *type = CIM_STRING;
return S_OK;
}
- else if (!wcsicmp( name, serverW ))
+ else if (!wcsicmp( name, L"__SERVER" ))
{
if (ret)
{
diff --git a/dlls/wbemprox/reg.c b/dlls/wbemprox/reg.c
index 64e94f6e1f..ec5a819142 100644
--- a/dlls/wbemprox/reg.c
+++ b/dlls/wbemprox/reg.c
@@ -100,12 +100,12 @@ HRESULT reg_create_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassO
TRACE("%p, %p\n", in, out);
- hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"hDefKey", 0, &defkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"sSubKeyName", 0, &subkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_stdregprovW, method_createkeyW, PARAM_OUT, &sig );
+ hr = create_signature( L"StdRegProv", L"CreateKey", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &subkey );
@@ -123,7 +123,7 @@ HRESULT reg_create_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassO
}
hr = create_key( (HKEY)(INT_PTR)V_I4(&defkey), V_BSTR(&subkey), &retval );
if (hr == S_OK && out_params)
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
VariantClear( &subkey );
IWbemClassObject_Release( sig );
@@ -199,12 +199,12 @@ HRESULT reg_enum_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObj
TRACE("%p, %p\n", in, out);
- hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"hDefKey", 0, &defkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"sSubKeyName", 0, &subkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_stdregprovW, method_enumkeyW, PARAM_OUT, &sig );
+ hr = create_signature( L"StdRegProv", L"EnumKey", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &subkey );
@@ -227,10 +227,10 @@ HRESULT reg_enum_key( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObj
{
if (!V_UI4( &retval ))
{
- hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
+ hr = IWbemClassObject_Put( out_params, L"sNames", 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
if (hr != S_OK) goto done;
}
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
}
done:
@@ -309,12 +309,12 @@ HRESULT reg_enum_values( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
TRACE("%p, %p\n", in, out);
- hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"hDefKey", 0, &defkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"sSubKeyName", 0, &subkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_stdregprovW, method_enumvaluesW, PARAM_OUT, &sig );
+ hr = create_signature( L"StdRegProv", L"EnumValues", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &subkey );
@@ -338,12 +338,12 @@ HRESULT reg_enum_values( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
{
if (!V_UI4( &retval ))
{
- hr = IWbemClassObject_Put( out_params, param_namesW, 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
+ hr = IWbemClassObject_Put( out_params, L"sNames", 0, &names, CIM_STRING|CIM_FLAG_ARRAY );
if (hr != S_OK) goto done;
- hr = IWbemClassObject_Put( out_params, param_typesW, 0, &types, CIM_SINT32|CIM_FLAG_ARRAY );
+ hr = IWbemClassObject_Put( out_params, L"Types", 0, &types, CIM_SINT32|CIM_FLAG_ARRAY );
if (hr != S_OK) goto done;
}
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
}
done:
@@ -392,14 +392,14 @@ HRESULT reg_get_stringvalue( IWbemClassObject *obj, IWbemClassObject *in, IWbemC
TRACE("%p, %p\n", in, out);
- hr = IWbemClassObject_Get( in, param_defkeyW, 0, &defkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"hDefKey", 0, &defkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = IWbemClassObject_Get( in, param_subkeynameW, 0, &subkey, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"sSubKeyName", 0, &subkey, NULL, NULL );
if (hr != S_OK) return hr;
- hr = IWbemClassObject_Get( in, param_valuenameW, 0, &name, NULL, NULL );
+ hr = IWbemClassObject_Get( in, L"sValueName", 0, &name, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_stdregprovW, method_getstringvalueW, PARAM_OUT, &sig );
+ hr = create_signature( L"StdRegProv", L"GetStringValue", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &name );
@@ -424,10 +424,10 @@ HRESULT reg_get_stringvalue( IWbemClassObject *obj, IWbemClassObject *in, IWbemC
{
if (!V_UI4( &retval ))
{
- hr = IWbemClassObject_Put( out_params, param_valueW, 0, &value, CIM_STRING );
+ hr = IWbemClassObject_Put( out_params, L"sValue", 0, &value, CIM_STRING );
if (hr != S_OK) goto done;
}
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
}
done:
diff --git a/dlls/wbemprox/security.c b/dlls/wbemprox/security.c
index 3ad7321a60..b8c5d90e30 100644
--- a/dlls/wbemprox/security.c
+++ b/dlls/wbemprox/security.c
@@ -119,9 +119,10 @@ static HRESULT get_sd( SECURITY_DESCRIPTOR **sd, DWORD *size )
if (SUCCEEDED(hr))
{
- if (!MakeSelfRelativeSD(&absolute_sd, *sd, size)) {
+ if (!MakeSelfRelativeSD(&absolute_sd, *sd, size))
+ {
HeapFree( GetProcessHeap(), 0, *sd );
- *sd = NULL;
+ *sd = NULL;
hr = E_FAIL;
}
}
@@ -139,7 +140,7 @@ HRESULT security_get_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
TRACE("%p, %p\n", in, out);
- hr = create_signature( class_systemsecurityW, method_getsdW, PARAM_OUT, &sig );
+ hr = create_signature( L"__SystemSecurity", L"GetSD", PARAM_OUT, &sig );
if (SUCCEEDED(hr))
{
@@ -159,7 +160,7 @@ HRESULT security_get_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
hr = to_byte_array( sd, sd_size, &var_sd );
if (SUCCEEDED(hr))
- hr = IWbemClassObject_Put( out_params, param_sdW, 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY );
+ hr = IWbemClassObject_Put( out_params, L"SD", 0, &var_sd, CIM_UINT8|CIM_FLAG_ARRAY );
HeapFree( GetProcessHeap(), 0, sd );
VariantClear( &var_sd );
@@ -168,7 +169,7 @@ HRESULT security_get_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
if (SUCCEEDED(hr))
{
set_variant( VT_UI4, ret, NULL, &retval );
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
}
if (SUCCEEDED(hr) && out)
@@ -192,7 +193,7 @@ HRESULT security_set_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
FIXME("stub\n");
- hr = create_signature( class_systemsecurityW, method_setsdW, PARAM_OUT, &sig );
+ hr = create_signature( L"__SystemSecurity", L"SetSD", PARAM_OUT, &sig );
if (SUCCEEDED(hr))
{
@@ -204,7 +205,7 @@ HRESULT security_set_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass
if (SUCCEEDED(hr))
{
set_variant( VT_UI4, S_OK, NULL, &retval );
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
if (SUCCEEDED(hr) && out)
{
diff --git a/dlls/wbemprox/service.c b/dlls/wbemprox/service.c
index 53010bc100..56bc2c5016 100644
--- a/dlls/wbemprox/service.c
+++ b/dlls/wbemprox/service.c
@@ -84,10 +84,10 @@ HRESULT service_pause_service( IWbemClassObject *obj, IWbemClassObject *in, IWbe
TRACE("%p, %p, %p\n", obj, in, out);
- hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Name", 0, &name, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_serviceW, method_pauseserviceW, PARAM_OUT, &sig );
+ hr = create_signature( L"Win32_Service", L"PauseService", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &name );
@@ -107,7 +107,7 @@ HRESULT service_pause_service( IWbemClassObject *obj, IWbemClassObject *in, IWbe
if (hr != S_OK) goto done;
if (out_params)
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
done:
VariantClear( &name );
@@ -129,10 +129,10 @@ HRESULT service_resume_service( IWbemClassObject *obj, IWbemClassObject *in, IWb
TRACE("%p, %p, %p\n", obj, in, out);
- hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Name", 0, &name, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_serviceW, method_resumeserviceW, PARAM_OUT, &sig );
+ hr = create_signature( L"Win32_Service", L"ResumeService", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &name );
@@ -152,7 +152,7 @@ HRESULT service_resume_service( IWbemClassObject *obj, IWbemClassObject *in, IWb
if (hr != S_OK) goto done;
if (out_params)
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
done:
VariantClear( &name );
@@ -198,10 +198,10 @@ HRESULT service_start_service( IWbemClassObject *obj, IWbemClassObject *in, IWbe
TRACE("%p, %p, %p\n", obj, in, out);
- hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Name", 0, &name, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_serviceW, method_startserviceW, PARAM_OUT, &sig );
+ hr = create_signature( L"Win32_Service", L"StartService", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &name );
@@ -221,7 +221,7 @@ HRESULT service_start_service( IWbemClassObject *obj, IWbemClassObject *in, IWbe
if (hr != S_OK) goto done;
if (out_params)
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
done:
VariantClear( &name );
@@ -243,10 +243,10 @@ HRESULT service_stop_service( IWbemClassObject *obj, IWbemClassObject *in, IWbem
TRACE("%p, %p, %p\n", obj, in, out);
- hr = IWbemClassObject_Get( obj, prop_nameW, 0, &name, NULL, NULL );
+ hr = IWbemClassObject_Get( obj, L"Name", 0, &name, NULL, NULL );
if (hr != S_OK) return hr;
- hr = create_signature( class_serviceW, method_stopserviceW, PARAM_OUT, &sig );
+ hr = create_signature( L"Win32_Service", L"StopService", PARAM_OUT, &sig );
if (hr != S_OK)
{
VariantClear( &name );
@@ -266,7 +266,7 @@ HRESULT service_stop_service( IWbemClassObject *obj, IWbemClassObject *in, IWbem
if (hr != S_OK) goto done;
if (out_params)
- hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 );
+ hr = IWbemClassObject_Put( out_params, L"ReturnValue", 0, &retval, CIM_UINT32 );
done:
VariantClear( &name );
diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c
index 5909c02e61..e2b452e217 100644
--- a/dlls/wbemprox/services.c
+++ b/dlls/wbemprox/services.c
@@ -103,9 +103,8 @@ static HRESULT WINAPI client_security_SetBlanket(
void *pAuthInfo,
DWORD Capabilities )
{
- static const OLECHAR defaultW[] =
- {'<','C','O','L','E','_','D','E','F','A','U','L','T','_','P','R','I','N','C','I','P','A','L','>',0};
- const OLECHAR *princname = (pServerPrincName == COLE_DEFAULT_PRINCIPAL) ? defaultW : pServerPrincName;
+ const OLECHAR *princname = (pServerPrincName == COLE_DEFAULT_PRINCIPAL) ?
+ L"<COLE_DEFAULT_PRINCIPAL>" : pServerPrincName;
FIXME("%p, %p, %u, %u, %s, %u, %u, %p, 0x%08x\n", iface, pProxy, AuthnSvc, AuthzSvc,
debugstr_w(princname), AuthnLevel, ImpLevel, pAuthInfo, Capabilities);
@@ -270,17 +269,15 @@ static HRESULT WINAPI wbem_services_OpenNamespace(
IWbemServices **ppWorkingNamespace,
IWbemCallResult **ppResult )
{
- static const WCHAR cimv2W[] = {'c','i','m','v','2',0};
- static const WCHAR defaultW[] = {'d','e','f','a','u','l','t',0};
struct wbem_services *ws = impl_from_IWbemServices( iface );
TRACE("%p, %s, 0x%08x, %p, %p, %p\n", iface, debugstr_w(strNamespace), lFlags,
pCtx, ppWorkingNamespace, ppResult);
- if ((wcsicmp( strNamespace, cimv2W ) && wcsicmp( strNamespace, defaultW )) || ws->namespace)
+ if ((wcsicmp( strNamespace, L"cimv2" ) && wcsicmp( strNamespace, L"default" )) || ws->namespace)
return WBEM_E_INVALID_NAMESPACE;
- return WbemServices_create( cimv2W, (void **)ppWorkingNamespace );
+ return WbemServices_create( L"cimv2", (void **)ppWorkingNamespace );
}
static HRESULT WINAPI wbem_services_CancelAsyncCall(
@@ -330,7 +327,7 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
if (*p == '\\')
{
- static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
+ static const WCHAR cimv2W[] = L"ROOT\\CIMV2";
WCHAR server[MAX_COMPUTERNAME_LENGTH+1];
DWORD server_len = ARRAY_SIZE(server);
@@ -417,11 +414,8 @@ void free_path( struct path *path )
WCHAR *query_from_path( const struct path *path )
{
- static const WCHAR selectW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','%','s',' ',
- 'W','H','E','R','E',' ','%','s',0};
- static const WCHAR select_allW[] =
- {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0};
+ static const WCHAR selectW[] = L"SELECT * FROM %s WHERE %s";
+ static const WCHAR select_allW[] = L"SELECT * FROM ";
WCHAR *query;
UINT len;
@@ -654,13 +648,11 @@ static HRESULT WINAPI wbem_services_ExecQuery(
IWbemContext *pCtx,
IEnumWbemClassObject **ppEnum )
{
- static const WCHAR wqlW[] = {'W','Q','L',0};
-
TRACE("%p, %s, %s, 0x%08x, %p, %p\n", iface, debugstr_w(strQueryLanguage),
debugstr_w(strQuery), lFlags, pCtx, ppEnum);
if (!strQueryLanguage || !strQuery || !strQuery[0]) return WBEM_E_INVALID_PARAMETER;
- if (wcsicmp( strQueryLanguage, wqlW )) return WBEM_E_INVALID_QUERY_TYPE;
+ if (wcsicmp( strQueryLanguage, L"WQL" )) return WBEM_E_INVALID_QUERY_TYPE;
return exec_query( strQuery, ppEnum );
}
diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c
index 7d531f5ec5..42971a420e 100644
--- a/dlls/wbemprox/table.c
+++ b/dlls/wbemprox/table.c
@@ -154,13 +154,6 @@ HRESULT get_value( const struct table *table, UINT row, UINT column, LONGLONG *v
BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
{
- static const WCHAR fmt_signedW[] = {'%','d',0};
- static const WCHAR fmt_unsignedW[] = {'%','u',0};
- static const WCHAR fmt_signed64W[] = {'%','I','6','4','d',0};
- static const WCHAR fmt_unsigned64W[] = {'%','I','6','4','u',0};
- static const WCHAR fmt_strW[] = {'\"','%','s','\"',0};
- static const WCHAR trueW[] = {'T','R','U','E',0};
- static const WCHAR falseW[] = {'F','A','L','S','E',0};
LONGLONG val;
BSTR ret;
WCHAR number[22];
@@ -176,8 +169,8 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
switch (table->columns[column].type & COL_TYPE_MASK)
{
case CIM_BOOLEAN:
- if (val) return SysAllocString( trueW );
- else return SysAllocString( falseW );
+ if (val) return SysAllocString( L"TRUE" );
+ else return SysAllocString( L"FALSE" );
case CIM_DATETIME:
case CIM_REFERENCE:
@@ -185,25 +178,25 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column )
if (!val) return NULL;
len = lstrlenW( (const WCHAR *)(INT_PTR)val ) + 2;
if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
- swprintf( ret, len, fmt_strW, (const WCHAR *)(INT_PTR)val );
+ swprintf( ret, len, L"\"%s\"", (const WCHAR *)(INT_PTR)val );
return ret;
case CIM_SINT16:
case CIM_SINT32:
- swprintf( number, ARRAY_SIZE( number ), fmt_signedW, val );
+ swprintf( number, ARRAY_SIZE( number ), L"%d", val );
return SysAllocString( number );
case CIM_UINT16:
case CIM_UINT32:
- swprintf( number, ARRAY_SIZE( number ), fmt_unsignedW, val );
+ swprintf( number, ARRAY_SIZE( number ), L"%u", val );
return SysAllocString( number );
case CIM_SINT64:
- wsprintfW( number, fmt_signed64W, val );
+ wsprintfW( number, L"%I64d", val );
return SysAllocString( number );
case CIM_UINT64:
- wsprintfW( number, fmt_unsigned64W, val );
+ wsprintfW( number, L"%I64u", val );
return SysAllocString( number );
default:
diff --git a/dlls/wbemprox/wbemlocator.c b/dlls/wbemprox/wbemlocator.c
index 18c37275ed..9b6f2cbc74 100644
--- a/dlls/wbemprox/wbemlocator.c
+++ b/dlls/wbemprox/wbemlocator.c
@@ -86,21 +86,16 @@ static HRESULT WINAPI wbem_locator_QueryInterface(
static BOOL is_local_machine( const WCHAR *server )
{
- static const WCHAR dotW[] = {'.',0};
- static const WCHAR localhostW[] = {'l','o','c','a','l','h','o','s','t',0};
WCHAR buffer[MAX_COMPUTERNAME_LENGTH + 1];
DWORD len = ARRAY_SIZE( buffer );
- if (!server || !wcscmp( server, dotW ) || !wcsicmp( server, localhostW )) return TRUE;
+ if (!server || !wcscmp( server, L"." ) || !wcsicmp( server, L"localhost" )) return TRUE;
if (GetComputerNameW( buffer, &len ) && !wcsicmp( server, buffer )) return TRUE;
return FALSE;
}
static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **namespace )
{
- static const WCHAR rootW[] = {'R','O','O','T',0};
- static const WCHAR cimv2W[] = {'C','I','M','V','2',0};
- static const WCHAR defaultW[] = {'D','E','F','A','U','L','T',0};
HRESULT hr = WBEM_E_INVALID_NAMESPACE;
const WCHAR *p, *q;
unsigned int len;
@@ -131,7 +126,7 @@ static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **na
p = q;
while (*q && *q != '\\' && *q != '/') q++;
len = q - p;
- if (len >= ARRAY_SIZE( rootW ) - 1 && wcsnicmp( rootW, p, len )) goto done;
+ if (len >= ARRAY_SIZE( L"root" ) - 1 && wcsnicmp( L"root", p, len )) goto done;
if (!*q)
{
hr = S_OK;
@@ -139,7 +134,7 @@ static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **na
}
q++;
len = lstrlenW( q );
- if (wcsicmp( q, cimv2W ) && wcsicmp( q, defaultW ))
+ if (wcsicmp( q, L"cimv2" ) && wcsicmp( q, L"default" ))
goto done;
if (!(*namespace = heap_alloc( (len + 1) * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
else
diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h
index 57ac793a4e..3064925764 100644
--- a/dlls/wbemprox/wbemprox_private.h
+++ b/dlls/wbemprox/wbemprox_private.h
@@ -276,33 +276,3 @@ static inline BOOL is_digit(WCHAR c)
{
return '0' <= c && c <= '9';
}
-
-static const WCHAR class_processW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s',0};
-static const WCHAR class_serviceW[] = {'W','i','n','3','2','_','S','e','r','v','i','c','e',0};
-static const WCHAR class_stdregprovW[] = {'S','t','d','R','e','g','P','r','o','v',0};
-static const WCHAR class_systemsecurityW[] = {'_','_','S','y','s','t','e','m','S','e','c','u','r','i','t','y',0};
-
-static const WCHAR prop_nameW[] = {'N','a','m','e',0};
-
-static const WCHAR method_createkeyW[] = {'C','r','e','a','t','e','K','e','y',0};
-static const WCHAR method_enumkeyW[] = {'E','n','u','m','K','e','y',0};
-static const WCHAR method_enumvaluesW[] = {'E','n','u','m','V','a','l','u','e','s',0};
-static const WCHAR method_getownerW[] = {'G','e','t','O','w','n','e','r',0};
-static const WCHAR method_getsdW[] = {'G','e','t','S','D',0};
-static const WCHAR method_getstringvalueW[] = {'G','e','t','S','t','r','i','n','g','V','a','l','u','e',0};
-static const WCHAR method_pauseserviceW[] = {'P','a','u','s','e','S','e','r','v','i','c','e',0};
-static const WCHAR method_resumeserviceW[] = {'R','e','s','u','m','e','S','e','r','v','i','c','e',0};
-static const WCHAR method_setsdW[] = {'S','e','t','S','D',0};
-static const WCHAR method_startserviceW[] = {'S','t','a','r','t','S','e','r','v','i','c','e',0};
-static const WCHAR method_stopserviceW[] = {'S','t','o','p','S','e','r','v','i','c','e',0};
-
-static const WCHAR param_defkeyW[] = {'h','D','e','f','K','e','y',0};
-static const WCHAR param_domainW[] = {'D','o','m','a','i','n',0};
-static const WCHAR param_namesW[] = {'s','N','a','m','e','s',0};
-static const WCHAR param_returnvalueW[] = {'R','e','t','u','r','n','V','a','l','u','e',0};
-static const WCHAR param_sdW[] = {'S','D',0};
-static const WCHAR param_subkeynameW[] = {'s','S','u','b','K','e','y','N','a','m','e',0};
-static const WCHAR param_typesW[] = {'T','y','p','e','s',0};
-static const WCHAR param_userW[] = {'U','s','e','r',0};
-static const WCHAR param_valueW[] = {'s','V','a','l','u','e',0};
-static const WCHAR param_valuenameW[] = {'s','V','a','l','u','e','N','a','m','e',0};
--
2.20.1
More information about the wine-devel
mailing list