ReactOS  0.4.14-dev-1331-g167fa2c
builtin.c File Reference
#include <stdarg.h>
#include "ntstatus.h"
#include "windef.h"
#include "winbase.h"
#include "winsock2.h"
#include "ws2tcpip.h"
#include "initguid.h"
#include "wbemcli.h"
#include "wbemprov.h"
#include "iphlpapi.h"
#include "netioapi.h"
#include "tlhelp32.h"
#include "d3d10.h"
#include "winternl.h"
#include "winioctl.h"
#include "winsvc.h"
#include "winver.h"
#include "sddl.h"
#include "ntsecapi.h"
#include "winspool.h"
#include "setupapi.h"
#include "wine/asm.h"
#include "wine/debug.h"
#include "wbemprox_private.h"
#include "pshpack1.h"
#include "poppack.h"
Include dependency graph for builtin.c:

Go to the source code of this file.

Classes

struct  record_associator
 
struct  record_baseboard
 
struct  record_bios
 
struct  record_cdromdrive
 
struct  record_computersystem
 
struct  record_computersystemproduct
 
struct  record_datafile
 
struct  record_desktopmonitor
 
struct  record_directory
 
struct  record_diskdrive
 
struct  record_diskdrivetodiskpartition
 
struct  record_diskpartition
 
struct  record_displaycontrollerconfig
 
struct  record_ip4routetable
 
struct  record_logicaldisk
 
struct  record_logicaldisktopartition
 
struct  record_networkadapter
 
struct  record_networkadapterconfig
 
struct  record_operatingsystem
 
struct  record_param
 
struct  record_physicalmedia
 
struct  record_physicalmemory
 
struct  record_pnpentity
 
struct  record_printer
 
struct  record_process
 
struct  record_processor
 
struct  record_qualifier
 
struct  record_quickfixengineering
 
struct  record_service
 
struct  record_sid
 
struct  record_sounddevice
 
struct  record_stdregprov
 
struct  record_systemsecurity
 
struct  record_systemenclosure
 
struct  record_videocontroller
 
struct  record_winsat
 
struct  smbios_prologue
 
struct  smbios_header
 
struct  smbios_baseboard
 
struct  smbios_bios
 
struct  smbios_chassis
 
struct  smbios_system
 
struct  dirstack
 
struct  association
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 
#define NONAMELESSSTRUCT
 
#define WIN32_NO_STATUS
 
#define FLAVOR_ID
 
#define RSMB   (('R' << 24) | ('S' << 16) | ('M' << 8) | 'B')
 
#define HW_VENDOR_AMD   0x1002
 
#define HW_VENDOR_NVIDIA   0x10de
 
#define HW_VENDOR_VMWARE   0x15ad
 
#define HW_VENDOR_INTEL   0x8086
 
#define C(c)   sizeof(c)/sizeof(c[0]), c
 
#define D(d)   sizeof(d)/sizeof(d[0]), 0, (BYTE *)d
 

Enumerations

enum  smbios_type { SMBIOS_TYPE_BIOS, SMBIOS_TYPE_SYSTEM, SMBIOS_TYPE_BASEBOARD, SMBIOS_TYPE_CHASSIS }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wbemprox)
 
static BOOL match_row (const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
 
static BOOL resize_table (struct table *table, UINT row_count, UINT row_size)
 
static const struct smbios_headerfind_smbios_entry (enum smbios_type type, const char *buf, UINT len)
 
static WCHARget_smbios_string (BYTE id, const char *buf, UINT offset, UINT buflen)
 
static WCHARget_baseboard_string (BYTE id, const char *buf, UINT len)
 
static WCHARget_baseboard_manufacturer (const char *buf, UINT len)
 
static WCHARget_baseboard_product (const char *buf, UINT len)
 
static WCHARget_baseboard_serialnumber (const char *buf, UINT len)
 
static WCHARget_baseboard_version (const char *buf, UINT len)
 
static enum fill_status fill_baseboard (struct table *table, const struct expr *cond)
 
static UINT16 get_bios_smbiosmajorversion (const char *buf, UINT len)
 
static UINT16 get_bios_smbiosminorversion (const char *buf, UINT len)
 
static WCHARget_bios_string (BYTE id, const char *buf, UINT len)
 
static WCHARget_bios_manufacturer (const char *buf, UINT len)
 
static WCHARconvert_bios_date (const WCHAR *str)
 
static WCHARget_bios_releasedate (const char *buf, UINT len)
 
static WCHARget_bios_smbiosbiosversion (const char *buf, UINT len)
 
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 UINT get_processor_count (void)
 
static UINT get_logical_processor_count (UINT *num_physical, UINT *num_packages)
 
static UINT64 get_total_physical_memory (void)
 
static UINT64 get_available_physical_memory (void)
 
static WCHARget_computername (void)
 
static WCHARget_username (void)
 
static enum fill_status fill_compsys (struct table *table, const struct expr *cond)
 
static WCHARget_compsysproduct_string (BYTE id, const char *buf, UINT len)
 
static WCHARget_compsysproduct_identifyingnumber (const char *buf, UINT len)
 
static WCHARget_compsysproduct_name (const char *buf, UINT len)
 
static WCHARget_compsysproduct_uuid (const char *buf, UINT len)
 
static WCHARget_compsysproduct_vendor (const char *buf, UINT len)
 
static WCHARget_compsysproduct_version (const char *buf, UINT len)
 
static enum fill_status fill_compsysproduct (struct table *table, const struct expr *cond)
 
static struct dirstackalloc_dirstack (UINT size)
 
static void clear_dirstack (struct dirstack *dirstack)
 
static void free_dirstack (struct dirstack *dirstack)
 
static BOOL push_dir (struct dirstack *dirstack, WCHAR *dir, UINT len)
 
static WCHARpop_dir (struct dirstack *dirstack, UINT *len)
 
static const WCHARpeek_dir (struct dirstack *dirstack)
 
static WCHARbuild_glob (WCHAR drive, const WCHAR *path, UINT len)
 
static WCHARbuild_name (WCHAR drive, const WCHAR *path)
 
static WCHARbuild_dirname (const WCHAR *path, UINT *ret_len)
 
static BOOL seen_dir (struct dirstack *dirstack, const WCHAR *path)
 
static UINT seed_dirs (struct dirstack *dirstack, const struct expr *cond, WCHAR root, UINT *count)
 
static WCHARappend_path (const WCHAR *path, const WCHAR *segment, UINT *len)
 
static WCHARget_file_version (const WCHAR *filename)
 
static enum fill_status fill_datafile (struct table *table, const struct expr *cond)
 
static UINT32 get_pixelsperxlogicalinch (void)
 
static enum fill_status fill_desktopmonitor (struct table *table, const struct expr *cond)
 
static enum fill_status fill_directory (struct table *table, const struct expr *cond)
 
static UINT64 get_freespace (const WCHAR *dir, UINT64 *disksize)
 
static enum fill_status fill_diskdrive (struct table *table, const struct expr *cond)
 
static void free_assocations (struct association *assoc, UINT count)
 
static struct associationget_diskdrivetodiskpartition_pairs (UINT *count)
 
static enum fill_status fill_diskdrivetodiskpartition (struct table *table, const struct expr *cond)
 
static WCHARget_filesystem (const WCHAR *root)
 
static enum fill_status fill_diskpartition (struct table *table, const struct expr *cond)
 
static UINT32 get_bitsperpixel (UINT *hres, UINT *vres)
 
static enum fill_status fill_displaycontrollerconfig (struct table *table, const struct expr *cond)
 
static WCHARget_ip4_string (DWORD addr)
 
static enum fill_status fill_ip4routetable (struct table *table, const struct expr *cond)
 
static WCHARget_volumename (const WCHAR *root)
 
static WCHARget_volumeserialnumber (const WCHAR *root)
 
static enum fill_status fill_logicaldisk (struct table *table, const struct expr *cond)
 
static struct associationget_logicaldisktopartition_pairs (UINT *count)
 
static enum fill_status fill_logicaldisktopartition (struct table *table, const struct expr *cond)
 
static UINT16 get_connection_status (IF_OPER_STATUS status)
 
static WCHARget_mac_address (const BYTE *addr, DWORD len)
 
static const WCHARget_adaptertype (DWORD type, int *id, int *physical)
 
static enum fill_status fill_networkadapter (struct table *table, const struct expr *cond)
 
static WCHARget_dnshostname (IP_ADAPTER_UNICAST_ADDRESS *addr)
 
static struct arrayget_defaultipgateway (IP_ADAPTER_GATEWAY_ADDRESS *list)
 
static struct arrayget_dnsserversearchorder (IP_ADAPTER_DNS_SERVER_ADDRESS *list)
 
static struct arrayget_ipaddress (IP_ADAPTER_UNICAST_ADDRESS_LH *list)
 
static struct arrayget_ipsubnet (IP_ADAPTER_UNICAST_ADDRESS_LH *list)
 
static WCHARget_settingid (UINT32 index)
 
static enum fill_status fill_networkadapterconfig (struct table *table, const struct expr *cond)
 
static enum fill_status fill_physicalmemory (struct table *table, const struct expr *cond)
 
static enum fill_status fill_pnpentity (struct table *table, const struct expr *cond)
 
static enum fill_status fill_printer (struct table *table, const struct expr *cond)
 
static WCHARget_cmdline (DWORD process_id)
 
static enum fill_status fill_process (struct table *table, const struct expr *cond)
 
void do_cpuid (unsigned int ax, unsigned int *p)
 
static unsigned int get_processor_model (unsigned int reg0, unsigned int *stepping, unsigned int *family)
 
static void regs_to_str (unsigned int *regs, unsigned int len, WCHAR *buffer)
 
static void get_processor_manufacturer (WCHAR *manufacturer, UINT len)
 
static const WCHARget_osarchitecture (void)
 
static void get_processor_caption (WCHAR *caption, UINT len)
 
static void get_processor_version (WCHAR *version, UINT len)
 
static UINT16 get_processor_revision (void)
 
static void get_processor_id (WCHAR *processor_id, UINT len)
 
static void get_processor_name (WCHAR *name)
 
static UINT get_processor_currentclockspeed (UINT index)
 
static UINT get_processor_maxclockspeed (UINT index)
 
static enum fill_status fill_processor (struct table *table, const struct expr *cond)
 
static WCHARget_lastbootuptime (void)
 
static WCHARget_localdatetime (void)
 
static WCHARget_systemdirectory (void)
 
static WCHARget_systemdrive (void)
 
static WCHARget_codeset (void)
 
static WCHARget_countrycode (void)
 
static WCHARget_locale (void)
 
static WCHARget_osbuildnumber (OSVERSIONINFOEXW *ver)
 
static WCHARget_oscaption (OSVERSIONINFOEXW *ver)
 
static WCHARget_osname (const WCHAR *caption)
 
static WCHARget_osversion (OSVERSIONINFOEXW *ver)
 
static DWORD get_operatingsystemsku (void)
 
static INT16 get_currenttimezone (void)
 
static enum fill_status fill_operatingsystem (struct table *table, const struct expr *cond)
 
static const WCHARget_service_type (DWORD type)
 
static const WCHARget_service_state (DWORD state)
 
static const WCHARget_service_startmode (DWORD mode)
 
static QUERY_SERVICE_CONFIGWquery_service_config (SC_HANDLE manager, const WCHAR *name)
 
static enum fill_status fill_service (struct table *table, const struct expr *cond)
 
static WCHARget_accountname (LSA_TRANSLATED_NAME *name)
 
static struct arrayget_binaryrepresentation (PSID sid, UINT len)
 
static WCHARget_referenceddomainname (LSA_REFERENCED_DOMAIN_LIST *domain)
 
static const WCHARfind_sid_str (const struct expr *cond)
 
static enum fill_status fill_sid (struct table *table, const struct expr *cond)
 
static WCHARget_systemenclosure_string (BYTE id, const char *buf, UINT len)
 
static WCHARget_systemenclosure_manufacturer (const char *buf, UINT len)
 
static int get_systemenclosure_lockpresent (const char *buf, UINT len)
 
static struct arraydup_array (const struct array *src)
 
static struct arrayget_systemenclosure_chassistypes (const char *buf, UINT len)
 
static enum fill_status fill_systemenclosure (struct table *table, const struct expr *cond)
 
static WCHARget_pnpdeviceid (DXGI_ADAPTER_DESC *desc)
 
static const WCHARget_installeddriver (UINT vendorid)
 
static enum fill_status fill_videocontroller (struct table *table, const struct expr *cond)
 
void init_table_list (void)
 

Variables

static const WCHAR class_associatorsW []
 
static const WCHAR class_baseboardW []
 
static const WCHAR class_biosW []
 
static const WCHAR class_cdromdriveW []
 
static const WCHAR class_compsysW []
 
static const WCHAR class_compsysproductW []
 
static const WCHAR class_datafileW []
 
static const WCHAR class_desktopmonitorW []
 
static const WCHAR class_directoryW []
 
static const WCHAR class_diskdriveW []
 
static const WCHAR class_diskdrivetodiskpartitionW []
 
static const WCHAR class_diskpartitionW []
 
static const WCHAR class_displaycontrollerconfigW []
 
static const WCHAR class_ip4routetableW []
 
static const WCHAR class_logicaldiskW []
 
static const WCHAR class_logicaldisk2W []
 
static const WCHAR class_logicaldisktopartitionW []
 
static const WCHAR class_networkadapterW []
 
static const WCHAR class_networkadapterconfigW []
 
static const WCHAR class_operatingsystemW []
 
static const WCHAR class_paramsW []
 
static const WCHAR class_physicalmediaW []
 
static const WCHAR class_physicalmemoryW []
 
static const WCHAR class_pnpentityW []
 
static const WCHAR class_printerW []
 
static const WCHAR class_process_getowner_outW []
 
static const WCHAR class_processorW []
 
static const WCHAR class_processor2W []
 
static const WCHAR class_qualifiersW []
 
static const WCHAR class_quickfixengineeringW []
 
static const WCHAR class_sidW []
 
static const WCHAR class_sounddeviceW []
 
static const WCHAR class_systemenclosureW []
 
static const WCHAR class_videocontrollerW []
 
static const WCHAR class_winsatW []
 
static const WCHAR prop_accountnameW []
 
static const WCHAR prop_acceptpauseW []
 
static const WCHAR prop_acceptstopW []
 
static const WCHAR prop_accessmaskW []
 
static const WCHAR prop_adapterdactypeW []
 
static const WCHAR prop_adapterramW []
 
static const WCHAR prop_adaptertypeW []
 
static const WCHAR prop_adaptertypeidW []
 
static const WCHAR prop_addresswidthW []
 
static const WCHAR prop_antecedentW []
 
static const WCHAR prop_architectureW []
 
static const WCHAR prop_assocclassW []
 
static const WCHAR prop_associatorW []
 
static const WCHAR prop_attributesW []
 
static const WCHAR prop_availabilityW []
 
static const WCHAR prop_binaryrepresentationW []
 
static const WCHAR prop_bitsperpixelW []
 
static const WCHAR prop_boolvalueW []
 
static const WCHAR prop_bootableW []
 
static const WCHAR prop_bootpartitionW []
 
static const WCHAR prop_buildnumberW []
 
static const WCHAR prop_capacityW []
 
static const WCHAR prop_captionW []
 
static const WCHAR prop_chassistypesW []
 
static const WCHAR prop_classW []
 
static const WCHAR prop_codesetW []
 
static const WCHAR prop_commandlineW []
 
static const WCHAR prop_configmanagererrorcodeW []
 
static const WCHAR prop_configuredclockspeedW []
 
static const WCHAR prop_countrycodeW []
 
static const WCHAR prop_cpuscoreW []
 
static const WCHAR prop_cpustatusW []
 
static const WCHAR prop_csdversionW []
 
static const WCHAR prop_csnameW []
 
static const WCHAR prop_currentbitsperpixelW []
 
static const WCHAR prop_currentclockspeedW []
 
static const WCHAR prop_currenthorizontalresW []
 
static const WCHAR prop_currentlanguageW []
 
static const WCHAR prop_currentrefreshrateW []
 
static const WCHAR prop_currentscanmodeW []
 
static const WCHAR prop_currenttimezoneW []
 
static const WCHAR prop_currentverticalresW []
 
static const WCHAR prop_d3dscoreW []
 
static const WCHAR prop_datawidthW []
 
static const WCHAR prop_defaultipgatewayW []
 
static const WCHAR prop_defaultvalueW []
 
static const WCHAR prop_dependentW []
 
static const WCHAR prop_descriptionW []
 
static const WCHAR prop_destinationW []
 
static const WCHAR prop_deviceidW []
 
static const WCHAR prop_devicelocatorW []
 
static const WCHAR prop_dhcpenabledW []
 
static const WCHAR prop_directionW []
 
static const WCHAR prop_diskscoreW []
 
static const WCHAR prop_displaynameW []
 
static const WCHAR prop_diskindexW []
 
static const WCHAR prop_dnshostnameW []
 
static const WCHAR prop_dnsserversearchorderW []
 
static const WCHAR prop_domainW []
 
static const WCHAR prop_domainroleW []
 
static const WCHAR prop_driveW []
 
static const WCHAR prop_driverdateW []
 
static const WCHAR prop_drivernameW []
 
static const WCHAR prop_driverversionW []
 
static const WCHAR prop_drivetypeW []
 
static const WCHAR prop_familyW []
 
static const WCHAR prop_filesystemW []
 
static const WCHAR prop_flavorW []
 
static const WCHAR prop_freespaceW []
 
static const WCHAR prop_freephysicalmemoryW []
 
static const WCHAR prop_handleW []
 
static const WCHAR prop_graphicsscoreW []
 
static const WCHAR prop_horizontalresolutionW []
 
static const WCHAR prop_hotfixidW []
 
static const WCHAR prop_idW []
 
static const WCHAR prop_identificationcodeW []
 
static const WCHAR prop_identifyingnumberW []
 
static const WCHAR prop_indexW []
 
static const WCHAR prop_installdateW []
 
static const WCHAR prop_installeddisplaydriversW []
 
static const WCHAR prop_interfaceindexW []
 
static const WCHAR prop_interfacetypeW []
 
static const WCHAR prop_intvalueW []
 
static const WCHAR prop_ipaddressW []
 
static const WCHAR prop_ipconnectionmetricW []
 
static const WCHAR prop_ipenabledW []
 
static const WCHAR prop_ipsubnet []
 
static const WCHAR prop_lastbootuptimeW []
 
static const WCHAR prop_levelW []
 
static const WCHAR prop_localW []
 
static const WCHAR prop_localdatetimeW []
 
static const WCHAR prop_localeW []
 
static const WCHAR prop_locationW []
 
static const WCHAR prop_lockpresentW []
 
static const WCHAR prop_macaddressW []
 
static const WCHAR prop_manufacturerW []
 
static const WCHAR prop_maxclockspeedW []
 
static const WCHAR prop_mediatypeW []
 
static const WCHAR prop_memberW []
 
static const WCHAR prop_memoryscoreW []
 
static const WCHAR prop_memorytypeW []
 
static const WCHAR prop_methodW []
 
static const WCHAR prop_modelW []
 
static const WCHAR prop_netconnectionstatusW []
 
static const WCHAR prop_networkW []
 
static const WCHAR prop_nexthopW []
 
static const WCHAR prop_numcoresW []
 
static const WCHAR prop_numlogicalprocessorsW []
 
static const WCHAR prop_numprocessorsW []
 
static const WCHAR prop_operatingsystemskuW []
 
static const WCHAR prop_osarchitectureW []
 
static const WCHAR prop_oslanguageW []
 
static const WCHAR prop_osproductsuiteW []
 
static const WCHAR prop_ostypeW []
 
static const WCHAR prop_parameterW []
 
static const WCHAR prop_partnumberW []
 
static const WCHAR prop_physicaladapterW []
 
static const WCHAR prop_pixelsperxlogicalinchW []
 
static const WCHAR prop_pnpdeviceidW []
 
static const WCHAR prop_portnameW []
 
static const WCHAR prop_pprocessidW []
 
static const WCHAR prop_primaryW []
 
static const WCHAR prop_processidW []
 
static const WCHAR prop_processoridW []
 
static const WCHAR prop_processortypeW []
 
static const WCHAR prop_productW []
 
static const WCHAR prop_productnameW []
 
static const WCHAR prop_referenceddomainnameW []
 
static const WCHAR prop_releasedateW []
 
static const WCHAR prop_revisionW []
 
static const WCHAR prop_serialnumberW []
 
static const WCHAR prop_servicepackmajorW []
 
static const WCHAR prop_servicepackminorW []
 
static const WCHAR prop_servicetypeW []
 
static const WCHAR prop_settingidW []
 
static const WCHAR prop_skunumberW []
 
static const WCHAR prop_smbiosbiosversionW []
 
static const WCHAR prop_smbiosmajorversionW []
 
static const WCHAR prop_smbiosminorversionW []
 
static const WCHAR prop_startmodeW []
 
static const WCHAR prop_sidW []
 
static const WCHAR prop_sidlengthW []
 
static const WCHAR prop_sizeW []
 
static const WCHAR prop_speedW []
 
static const WCHAR prop_startingoffsetW []
 
static const WCHAR prop_stateW []
 
static const WCHAR prop_statusW []
 
static const WCHAR prop_statusinfoW []
 
static const WCHAR prop_strvalueW []
 
static const WCHAR prop_suitemaskW []
 
static const WCHAR prop_systemdirectoryW []
 
static const WCHAR prop_systemdriveW []
 
static const WCHAR prop_systemnameW []
 
static const WCHAR prop_tagW []
 
static const WCHAR prop_threadcountW []
 
static const WCHAR prop_timetakenW []
 
static const WCHAR prop_totalphysicalmemoryW []
 
static const WCHAR prop_totalvirtualmemorysizeW []
 
static const WCHAR prop_totalvisiblememorysizeW []
 
static const WCHAR prop_typeW []
 
static const WCHAR prop_uniqueidW []
 
static const WCHAR prop_usernameW []
 
static const WCHAR prop_uuidW []
 
static const WCHAR prop_vendorW []
 
static const WCHAR prop_versionW []
 
static const WCHAR prop_verticalresolutionW []
 
static const WCHAR prop_videoarchitectureW []
 
static const WCHAR prop_videomemorytypeW []
 
static const WCHAR prop_videomodedescriptionW []
 
static const WCHAR prop_videoprocessorW []
 
static const WCHAR prop_volumenameW []
 
static const WCHAR prop_volumeserialnumberW []
 
static const WCHAR prop_winsatassessmentstateW []
 
static const WCHAR prop_winsprlevelW []
 
static const WCHAR prop_workingsetsizeW []
 
static const struct column col_associator []
 
static const struct column col_baseboard []
 
static const struct column col_bios []
 
static const struct column col_cdromdrive []
 
static const struct column col_compsys []
 
static const struct column col_compsysproduct []
 
static const struct column col_datafile []
 
static const struct column col_desktopmonitor []
 
static const struct column col_directory []
 
static const struct column col_diskdrive []
 
static const struct column col_diskdrivetodiskpartition []
 
static const struct column col_diskpartition []
 
static const struct column col_displaycontrollerconfig []
 
static const struct column col_ip4routetable []
 
static const struct column col_logicaldisk []
 
static const struct column col_logicaldisktopartition []
 
static const struct column col_networkadapter []
 
static const struct column col_networkadapterconfig []
 
static const struct column col_operatingsystem []
 
static const struct column col_param []
 
static const struct column col_physicalmedia []
 
static const struct column col_physicalmemory []
 
static const struct column col_pnpentity []
 
static const struct column col_printer []
 
static const struct column col_process []
 
static const struct column col_processor []
 
static const struct column col_qualifier []
 
static const struct column col_quickfixengineering []
 
static const struct column col_service []
 
static const struct column col_sid []
 
static const struct column col_sounddevice []
 
static const struct column col_stdregprov []
 
static const struct column col_systemenclosure []
 
static const struct column col_systemsecurity []
 
static const struct column col_videocontroller []
 
static const struct column col_winsat []
 
static const WCHAR baseboard_manufacturerW []
 
static const WCHAR baseboard_serialnumberW []
 
static const WCHAR baseboard_tagW []
 
static const WCHAR baseboard_versionW []
 
static const WCHAR bios_descriptionW []
 
static const WCHAR bios_manufacturerW []
 
static const WCHAR bios_releasedateW []
 
static const WCHAR bios_serialnumberW []
 
static const WCHAR bios_smbiosbiosversionW []
 
static const WCHAR bios_versionW []
 
static const WCHAR cdromdrive_mediatypeW []
 
static const WCHAR cdromdrive_nameW []
 
static const WCHAR cdromdrive_pnpdeviceidW []
 
static const WCHAR compsys_descriptionW []
 
static const WCHAR compsys_domainW []
 
static const WCHAR compsys_manufacturerW []
 
static const WCHAR compsys_modelW []
 
static const WCHAR compsysproduct_identifyingnumberW []
 
static const WCHAR compsysproduct_nameW []
 
static const WCHAR compsysproduct_uuidW []
 
static const WCHAR compsysproduct_vendorW []
 
static const WCHAR compsysproduct_versionW []
 
static const WCHAR diskdrive_interfacetypeW []
 
static const WCHAR diskdrive_manufacturerW []
 
static const WCHAR diskdrive_mediatype_fixedW []
 
static const WCHAR diskdrive_mediatype_removableW []
 
static const WCHAR diskdrive_modelW []
 
static const WCHAR diskdrive_pnpdeviceidW []
 
static const WCHAR diskdrive_serialW []
 
static const WCHAR networkadapter_pnpdeviceidW []
 
static const WCHAR os_32bitW []
 
static const WCHAR os_64bitW []
 
static const WCHAR os_installdateW []
 
static const WCHAR os_serialnumberW []
 
static const WCHAR physicalmedia_tagW []
 
static const WCHAR quickfixengineering_captionW []
 
static const WCHAR quickfixengineering_hotfixidW []
 
static const WCHAR sounddevice_productnameW []
 
static const WCHAR systemenclosure_systemenclosureW []
 
static const WCHAR systemenclosure_tagW []
 
static const WCHAR systemenclosure_manufacturerW []
 
static const WCHAR videocontroller_dactypeW []
 
static const WCHAR videocontroller_deviceidW []
 
static const WCHAR videocontroller_driverdateW []
 
static const WCHAR videocontroller_driverversionW []
 
static const WCHAR videocontroller_statusW []
 
static const WCHAR winsat_timetakenW []
 
static const struct record_associator data_associator []
 
static const struct record_param data_param []
 
static const struct record_physicalmedia data_physicalmedia []
 
static const struct record_qualifier data_qualifier []
 
static const struct record_quickfixengineering data_quickfixengineering []
 
static const struct record_sounddevice data_sounddevice []
 
static const struct record_stdregprov data_stdregprov []
 
static UINT16 systemenclosure_chassistypes []
 
static const struct array systemenclosure_chassistypes_array
 
static const struct record_systemsecurity data_systemsecurity []
 
static const struct record_winsat data_winsat []
 
static struct table builtin_classes []
 

Macro Definition Documentation

◆ C

#define C (   c)    sizeof(c)/sizeof(c[0]), c

Definition at line 4556 of file builtin.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 19 of file builtin.c.

◆ D

#define D (   d)    sizeof(d)/sizeof(d[0]), 0, (BYTE *)d

Definition at line 4557 of file builtin.c.

◆ FLAVOR_ID

◆ HW_VENDOR_AMD

#define HW_VENDOR_AMD   0x1002

Definition at line 4464 of file builtin.c.

◆ HW_VENDOR_INTEL

#define HW_VENDOR_INTEL   0x8086

Definition at line 4467 of file builtin.c.

◆ HW_VENDOR_NVIDIA

#define HW_VENDOR_NVIDIA   0x10de

Definition at line 4465 of file builtin.c.

◆ HW_VENDOR_VMWARE

#define HW_VENDOR_VMWARE   0x15ad

Definition at line 4466 of file builtin.c.

◆ NONAMELESSSTRUCT

#define NONAMELESSSTRUCT

Definition at line 21 of file builtin.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 20 of file builtin.c.

◆ RSMB

#define RSMB   (('R' << 24) | ('S' << 16) | ('M' << 8) | 'B')

Definition at line 1547 of file builtin.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 29 of file builtin.c.

Enumeration Type Documentation

◆ smbios_type

Enumerator
SMBIOS_TYPE_BIOS 
SMBIOS_TYPE_SYSTEM 
SMBIOS_TYPE_BASEBOARD 
SMBIOS_TYPE_CHASSIS 

Definition at line 1491 of file builtin.c.

Function Documentation

◆ alloc_dirstack()

static struct dirstack* alloc_dirstack ( UINT  size)
static

Definition at line 2103 of file builtin.c.

2104 {
2105  struct dirstack *dirstack;
2106 
2107  if (!(dirstack = heap_alloc( sizeof(*dirstack) ))) return NULL;
2108  if (!(dirstack->dirs = heap_alloc( sizeof(WCHAR *) * size )))
2109  {
2110  heap_free( dirstack );
2111  return NULL;
2112  }
2113  if (!(dirstack->len_dirs = heap_alloc( sizeof(UINT) * size )))
2114  {
2115  heap_free( dirstack->dirs );
2116  heap_free( dirstack );
2117  return NULL;
2118  }
2119  dirstack->num_dirs = 0;
2121  return dirstack;
2122 }
UINT num_allocated
Definition: builtin.c:2100
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
WCHAR ** dirs
Definition: builtin.c:2097
UINT * len_dirs
Definition: builtin.c:2098
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
UINT num_dirs
Definition: builtin.c:2099
unsigned int UINT
Definition: ndis.h:50
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by fill_datafile(), and fill_directory().

◆ append_path()

static WCHAR* append_path ( const WCHAR path,
const WCHAR segment,
UINT len 
)
static

Definition at line 2317 of file builtin.c.

2318 {
2319  UINT len_path = 0, len_segment = lstrlenW( segment );
2320  WCHAR *ret;
2321 
2322  *len = 0;
2323  if (path) len_path = lstrlenW( path );
2324  if (!(ret = heap_alloc( (len_path + len_segment + 2) * sizeof(WCHAR) ))) return NULL;
2325  if (path && len_path)
2326  {
2327  memcpy( ret, path, len_path * sizeof(WCHAR) );
2328  ret[len_path] = '\\';
2329  *len += len_path + 1;
2330  }
2331  memcpy( ret + *len, segment, len_segment * sizeof(WCHAR) );
2332  *len += len_segment;
2333  ret[*len] = 0;
2334  return ret;
2335 }
#define lstrlenW
Definition: compat.h:415
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
unsigned int UINT
Definition: ndis.h:50

Referenced by fill_datafile(), and fill_directory().

◆ build_dirname()

static WCHAR* build_dirname ( const WCHAR path,
UINT ret_len 
)
static

Definition at line 2230 of file builtin.c.

2231 {
2232  const WCHAR *p = path, *start;
2233  UINT len, i;
2234  WCHAR *ret;
2235 
2236  if (!iswalpha( p[0] ) || p[1] != ':' || p[2] != '\\' || p[3] != '\\' || !p[4]) return NULL;
2237  start = path + 4;
2238  len = lstrlenW( start );
2239  p = start + len - 1;
2240  if (*p == '\\') return NULL;
2241 
2242  while (p >= start && *p != '\\') { len--; p--; };
2243  while (p >= start && *p == '\\') { len--; p--; };
2244 
2245  if (!(ret = heap_alloc( (len + 1) * sizeof(WCHAR) ))) return NULL;
2246  for (i = 0, p = start; p < start + len; p++)
2247  {
2248  if (p[0] == '\\' && p[1] == '\\')
2249  {
2250  ret[i++] = '\\';
2251  p++;
2252  }
2253  else ret[i++] = *p;
2254  }
2255  ret[i] = 0;
2256  *ret_len = i;
2257  return ret;
2258 }
GLsizei const GLchar ** path
Definition: glext.h:7234
#define iswalpha(_c)
Definition: ctype.h:664
#define lstrlenW
Definition: compat.h:415
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
static JOBOBJECTINFOCLASS LPVOID DWORD LPDWORD ret_len
Definition: process.c:79
int ret
GLenum GLsizei len
Definition: glext.h:6722
GLuint start
Definition: gl.h:1545
unsigned int UINT
Definition: ndis.h:50
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by seed_dirs().

◆ build_glob()

static WCHAR* build_glob ( WCHAR  drive,
const WCHAR path,
UINT  len 
)
static

Definition at line 2181 of file builtin.c.

2182 {
2183  UINT i = 0;
2184  WCHAR *ret;
2185 
2186  if (!(ret = heap_alloc( (len + 6) * sizeof(WCHAR) ))) return NULL;
2187  ret[i++] = drive;
2188  ret[i++] = ':';
2189  ret[i++] = '\\';
2190  if (path && len)
2191  {
2192  memcpy( ret + i, path, len * sizeof(WCHAR) );
2193  i += len;
2194  ret[i++] = '\\';
2195  }
2196  ret[i++] = '*';
2197  ret[i] = 0;
2198  return ret;
2199 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
static char drive[2]
Definition: batch.c:28
unsigned int UINT
Definition: ndis.h:50

Referenced by fill_datafile(), and fill_directory().

◆ build_name()

static WCHAR* build_name ( WCHAR  drive,
const WCHAR path 
)
static

Definition at line 2201 of file builtin.c.

2202 {
2203  UINT i = 0, len = 0;
2204  const WCHAR *p;
2205  WCHAR *ret;
2206 
2207  for (p = path; *p; p++)
2208  {
2209  if (*p == '\\') len += 2;
2210  else len++;
2211  };
2212  if (!(ret = heap_alloc( (len + 5) * sizeof(WCHAR) ))) return NULL;
2213  ret[i++] = drive;
2214  ret[i++] = ':';
2215  ret[i++] = '\\';
2216  ret[i++] = '\\';
2217  for (p = path; *p; p++)
2218  {
2219  if (*p != '\\') ret[i++] = *p;
2220  else
2221  {
2222  ret[i++] = '\\';
2223  ret[i++] = '\\';
2224  }
2225  }
2226  ret[i] = 0;
2227  return ret;
2228 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
GLenum GLsizei len
Definition: glext.h:6722
static char drive[2]
Definition: batch.c:28
unsigned int UINT
Definition: ndis.h:50
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by fill_datafile(), and fill_directory().

◆ clear_dirstack()

static void clear_dirstack ( struct dirstack dirstack)
static

Definition at line 2124 of file builtin.c.

2125 {
2126  UINT i;
2127  for (i = 0; i < dirstack->num_dirs; i++) heap_free( dirstack->dirs[i] );
2128  dirstack->num_dirs = 0;
2129 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
WCHAR ** dirs
Definition: builtin.c:2097
UINT num_dirs
Definition: builtin.c:2099
unsigned int UINT
Definition: ndis.h:50
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by fill_datafile(), fill_directory(), and free_dirstack().

◆ convert_bios_date()

static WCHAR* convert_bios_date ( const WCHAR str)
static

Definition at line 1711 of file builtin.c.

1712 {
1713  static const WCHAR fmtW[] =
1714  {'%','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};
1715  UINT year, month, day, len = lstrlenW( str );
1716  const WCHAR *p = str, *q;
1717  WCHAR *ret;
1718 
1719  while (len && iswspace( *p )) { p++; len--; }
1720  while (len && iswspace( p[len - 1] )) { len--; }
1721 
1722  q = p;
1723  while (len && iswdigit( *q )) { q++; len--; };
1724  if (q - p != 2 || !len || *q != '/') return NULL;
1725  month = (p[0] - '0') * 10 + p[1] - '0';
1726 
1727  p = ++q; len--;
1728  while (len && iswdigit( *q )) { q++; len--; };
1729  if (q - p != 2 || !len || *q != '/') return NULL;
1730  day = (p[0] - '0') * 10 + p[1] - '0';
1731 
1732  p = ++q; len--;
1733  while (len && iswdigit( *q )) { q++; len--; };
1734  if (q - p == 4) year = (p[0] - '0') * 1000 + (p[1] - '0') * 100 + (p[2] - '0') * 10 + p[3] - '0';
1735  else if (q - p == 2) year = 1900 + (p[0] - '0') * 10 + p[1] - '0';
1736  else return NULL;
1737 
1738  if (!(ret = heap_alloc( sizeof(fmtW) ))) return NULL;
1739  swprintf( ret, fmtW, year, month, day );
1740  return ret;
1741 }
static DOUBLE day(DOUBLE time)
Definition: date.c:117
#define iswdigit(_c)
Definition: ctype.h:667
#define lstrlenW
Definition: compat.h:415
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
#define iswspace(_c)
Definition: ctype.h:669
int ret
GLenum GLsizei len
Definition: glext.h:6722
unsigned int UINT
Definition: ndis.h:50
int month[12]
Definition: systime.c:13
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by get_bios_releasedate().

◆ do_cpuid()

void do_cpuid ( unsigned int  ax,
unsigned int p 
)

Definition at line 3649 of file builtin.c.

3650 {
3651  FIXME("\n");
3652 }
#define FIXME(fmt,...)
Definition: debug.h:110

Referenced by get_processor_caption(), get_processor_id(), get_processor_manufacturer(), get_processor_name(), get_processor_revision(), and get_processor_version().

◆ dup_array()

static struct array* dup_array ( const struct array src)
static

Definition at line 4375 of file builtin.c.

4376 {
4377  struct array *dst;
4378  if (!(dst = heap_alloc( sizeof(*dst) ))) return NULL;
4379  if (!(dst->ptr = heap_alloc( src->count * src->elem_size )))
4380  {
4381  heap_free( dst );
4382  return NULL;
4383  }
4384  memcpy( dst->ptr, src->ptr, src->count * src->elem_size );
4385  dst->elem_size = src->elem_size;
4386  dst->count = src->count;
4387  return dst;
4388 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by get_systemenclosure_chassistypes().

◆ fill_baseboard()

static enum fill_status fill_baseboard ( struct table table,
const struct expr cond 
)
static

Definition at line 1646 of file builtin.c.

1647 {
1648  struct record_baseboard *rec;
1650  UINT row = 0, len;
1651  char *buf;
1652 
1653  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
1654 
1655  len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
1656  if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
1658 
1659  rec = (struct record_baseboard *)table->data;
1661  rec->model = baseboard_tagW;
1662  rec->name = baseboard_tagW;
1663  rec->product = get_baseboard_product( buf, len );
1665  rec->tag = baseboard_tagW;
1666  rec->version = get_baseboard_version( buf, len );
1667  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
1668  else row++;
1669 
1670  heap_free( buf );
1671 
1672  TRACE("created %u rows\n", row);
1673  table->num_rows = row;
1674  return status;
1675 }
const WCHAR * version
Definition: builtin.c:998
const WCHAR * manufacturer
Definition: builtin.c:992
UINT WINAPI GetSystemFirmwareTable(IN DWORD FirmwareTableProviderSignature, IN DWORD FirmwareTableID, OUT PVOID pFirmwareTableBuffer, IN DWORD BufferSize)
Definition: sysinfo.c:548
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
UINT num_rows
static WCHAR * get_baseboard_product(const char *buf, UINT len)
Definition: builtin.c:1625
static const WCHAR baseboard_tagW[]
Definition: builtin.c:886
static WCHAR * get_baseboard_version(const char *buf, UINT len)
Definition: builtin.c:1639
const WCHAR * product
Definition: builtin.c:995
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define RSMB
Definition: builtin.c:1547
static WCHAR * get_baseboard_manufacturer(const char *buf, UINT len)
Definition: builtin.c:1618
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const WCHAR * model
Definition: builtin.c:993
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
const WCHAR * tag
Definition: builtin.c:997
GLenum GLsizei len
Definition: glext.h:6722
static WCHAR * get_baseboard_serialnumber(const char *buf, UINT len)
Definition: builtin.c:1632
fill_status
BYTE * data
const WCHAR * name
Definition: builtin.c:994
unsigned int UINT
Definition: ndis.h:50
static SERVICE_STATUS status
Definition: service.c:31
const WCHAR * serialnumber
Definition: builtin.c:996
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: ps.c:97

◆ fill_bios()

static enum fill_status fill_bios ( struct table table,
const struct expr cond 
)
static

Definition at line 1758 of file builtin.c.

1759 {
1760  struct record_bios *rec;
1762  UINT row = 0, len;
1763  char *buf;
1764 
1765  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
1766 
1767  len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
1768  if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
1770 
1771  rec = (struct record_bios *)table->data;
1772  rec->currentlanguage = NULL;
1774  rec->identificationcode = NULL;
1776  rec->name = bios_descriptionW;
1782  rec->version = bios_versionW;
1783  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
1784  else row++;
1785 
1786  heap_free( buf );
1787 
1788  TRACE("created %u rows\n", row);
1789  table->num_rows = row;
1790  return status;
1791 }
static WCHAR * get_bios_smbiosbiosversion(const char *buf, UINT len)
Definition: builtin.c:1751
const WCHAR * manufacturer
Definition: builtin.c:1005
UINT WINAPI GetSystemFirmwareTable(IN DWORD FirmwareTableProviderSignature, IN DWORD FirmwareTableID, OUT PVOID pFirmwareTableBuffer, IN DWORD BufferSize)
Definition: sysinfo.c:548
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
UINT num_rows
const WCHAR * identificationcode
Definition: builtin.c:1004
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define RSMB
Definition: builtin.c:1547
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
static WCHAR * get_bios_releasedate(const char *buf, UINT len)
Definition: builtin.c:1743
const WCHAR * releasedate
Definition: builtin.c:1007
static const WCHAR bios_serialnumberW[]
Definition: builtin.c:896
static UINT16 get_bios_smbiosminorversion(const char *buf, UINT len)
Definition: builtin.c:1684
smooth NULL
Definition: ftsmooth.c:416
const WCHAR * smbiosbiosversion
Definition: builtin.c:1009
static const WCHAR bios_descriptionW[]
Definition: builtin.c:890
const WCHAR * name
Definition: builtin.c:1006
#define TRACE(s)
Definition: solgame.cpp:4
UINT16 smbiosmajorversion
Definition: builtin.c:1010
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
const WCHAR * serialnumber
Definition: builtin.c:1008
static WCHAR * get_bios_manufacturer(const char *buf, UINT len)
Definition: builtin.c:1704
const WCHAR * description
Definition: builtin.c:1003
static UINT16 get_bios_smbiosmajorversion(const char *buf, UINT len)
Definition: builtin.c:1677
GLenum GLsizei len
Definition: glext.h:6722
fill_status
BYTE * data
const WCHAR * version
Definition: builtin.c:1012
unsigned int UINT
Definition: ndis.h:50
UINT16 smbiosminorversion
Definition: builtin.c:1011
static const WCHAR bios_versionW[]
Definition: builtin.c:900
const WCHAR * currentlanguage
Definition: builtin.c:1002
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: ps.c:97

◆ fill_cdromdrive()

static enum fill_status fill_cdromdrive ( struct table table,
const struct expr cond 
)
static

Definition at line 1793 of file builtin.c.

1794 {
1795  static const WCHAR fmtW[] = {'%','c',':',0};
1796  WCHAR drive[3], root[] = {'A',':','\\',0};
1797  struct record_cdromdrive *rec;
1798  UINT i, row = 0, offset = 0;
1799  DWORD drives = GetLogicalDrives();
1801 
1802  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
1803 
1804  for (i = 0; i < 26; i++)
1805  {
1806  if (drives & (1 << i))
1807  {
1808  root[0] = 'A' + i;
1809  if (GetDriveTypeW( root ) != DRIVE_CDROM)
1810  continue;
1811 
1812  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
1813 
1814  rec = (struct record_cdromdrive *)(table->data + offset);
1816  swprintf( drive, fmtW, 'A' + i );
1817  rec->drive = heap_strdupW( drive );
1819  rec->name = cdromdrive_nameW;
1821  if (!match_row( table, row, cond, &status ))
1822  {
1824  continue;
1825  }
1826  offset += sizeof(*rec);
1827  row++;
1828  }
1829  }
1830  TRACE("created %u rows\n", row);
1831  table->num_rows = row;
1832  return status;
1833 }
const WCHAR * pnpdevice_id
Definition: builtin.c:1020
UINT num_rows
GLintptr offset
Definition: glext.h:5920
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
const WCHAR * mediatype
Definition: builtin.c:1018
const WCHAR * drive
Definition: builtin.c:1017
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define DRIVE_CDROM
Definition: machpc98.h:115
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
const WCHAR * device_id
Definition: builtin.c:1016
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static const WCHAR cdromdrive_nameW[]
Definition: builtin.c:904
static const WCHAR cdromdrive_mediatypeW[]
Definition: builtin.c:902
const WCHAR * name
Definition: builtin.c:1019
static const WCHAR cdromdrive_pnpdeviceidW[]
Definition: builtin.c:906
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_compsys()

static enum fill_status fill_compsys ( struct table table,
const struct expr cond 
)
static

Definition at line 1968 of file builtin.c.

1969 {
1970  struct record_computersystem *rec;
1972  UINT row = 0;
1973 
1974  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
1975 
1976  rec = (struct record_computersystem *)table->data;
1978  rec->domain = compsys_domainW;
1979  rec->domainrole = 0; /* standalone workstation */
1981  rec->model = compsys_modelW;
1982  rec->name = get_computername();
1983 #ifdef __REACTOS__
1986 #else
1988 #endif
1990  rec->username = get_username();
1991  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
1992  else row++;
1993 
1994  TRACE("created %u rows\n", row);
1995  table->num_rows = row;
1996  return status;
1997 }
static UINT64 get_total_physical_memory(void)
Definition: builtin.c:1922
const WCHAR * description
Definition: builtin.c:1024
static WCHAR * get_username(void)
Definition: builtin.c:1950
const WCHAR * model
Definition: builtin.c:1028
UINT num_rows
static const WCHAR compsys_modelW[]
Definition: builtin.c:917
static const WCHAR compsys_domainW[]
Definition: builtin.c:913
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
static UINT get_logical_processor_count(UINT *num_physical, UINT *num_packages)
Definition: builtin.c:1878
UINT64 total_physical_memory
Definition: builtin.c:1032
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR compsys_descriptionW[]
Definition: builtin.c:911
#define TRACE(s)
Definition: solgame.cpp:4
const WCHAR * manufacturer
Definition: builtin.c:1027
const WCHAR * username
Definition: builtin.c:1033
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
const WCHAR * name
Definition: builtin.c:1029
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
UINT32 num_logical_processors
Definition: builtin.c:1030
static WCHAR * get_computername(void)
Definition: builtin.c:1940
const WCHAR * domain
Definition: builtin.c:1025
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static const WCHAR compsys_manufacturerW[]
Definition: builtin.c:915
Definition: ps.c:97
static UINT get_processor_count(void)
Definition: builtin.c:1835

◆ fill_compsysproduct()

static enum fill_status fill_compsysproduct ( struct table table,
const struct expr cond 
)
static

Definition at line 2065 of file builtin.c.

2066 {
2067  struct record_computersystemproduct *rec;
2069  UINT row = 0, len;
2070  char *buf;
2071 
2072  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2073 
2074  len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
2075  if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
2077 
2078  rec = (struct record_computersystemproduct *)table->data;
2080  rec->name = get_compsysproduct_name( buf, len );
2081  rec->skunumber = NULL;
2082  rec->uuid = get_compsysproduct_uuid( buf, len );
2085  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
2086  else row++;
2087 
2088  heap_free( buf );
2089 
2090  TRACE("created %u rows\n", row);
2091  table->num_rows = row;
2092  return status;
2093 }
static WCHAR * get_compsysproduct_uuid(const char *buf, UINT len)
Definition: builtin.c:2026
UINT WINAPI GetSystemFirmwareTable(IN DWORD FirmwareTableProviderSignature, IN DWORD FirmwareTableID, OUT PVOID pFirmwareTableBuffer, IN DWORD BufferSize)
Definition: sysinfo.c:548
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
UINT num_rows
static WCHAR * get_compsysproduct_version(const char *buf, UINT len)
Definition: builtin.c:2058
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define RSMB
Definition: builtin.c:1547
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
static WCHAR * get_compsysproduct_name(const char *buf, UINT len)
Definition: builtin.c:2019
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
GLenum GLsizei len
Definition: glext.h:6722
const WCHAR * identifyingnumber
Definition: builtin.c:1037
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static WCHAR * get_compsysproduct_identifyingnumber(const char *buf, UINT len)
Definition: builtin.c:2012
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static WCHAR * get_compsysproduct_vendor(const char *buf, UINT len)
Definition: builtin.c:2051
Definition: ps.c:97

◆ fill_datafile()

static enum fill_status fill_datafile ( struct table table,
const struct expr cond 
)
static

Definition at line 2364 of file builtin.c.

2365 {
2366  static const WCHAR dotW[] = {'.',0}, dotdotW[] = {'.','.',0};
2367  struct record_datafile *rec;
2368  UINT i, len, row = 0, offset = 0, num_expected_rows;
2369  WCHAR *glob = NULL, *path = NULL, *new_path, root[] = {'A',':','\\',0};
2370  DWORD drives = GetLogicalDrives();
2372  HANDLE handle;
2373  struct dirstack *dirstack;
2375 
2376  if (!resize_table( table, 8, sizeof(*rec) )) return FILL_STATUS_FAILED;
2377 
2378  dirstack = alloc_dirstack(2);
2379 
2380  for (i = 0; i < 26; i++)
2381  {
2382  if (!(drives & (1 << i))) continue;
2383 
2384  root[0] = 'A' + i;
2385  if (GetDriveTypeW( root ) != DRIVE_FIXED) continue;
2386 
2387  num_expected_rows = 0;
2388  if (!seed_dirs( dirstack, cond, root[0], &num_expected_rows )) clear_dirstack( dirstack );
2389 
2390  for (;;)
2391  {
2392  heap_free( glob );
2393  heap_free( path );
2394  path = pop_dir( dirstack, &len );
2395  if (!(glob = build_glob( root[0], path, len )))
2396  {
2398  goto done;
2399  }
2401  {
2402  do
2403  {
2404  if (!resize_table( table, row + 1, sizeof(*rec) ))
2405  {
2407  FindClose( handle );
2408  goto done;
2409  }
2410  if (!wcscmp( data.cFileName, dotW ) || !wcscmp( data.cFileName, dotdotW )) continue;
2411 
2412  if (!(new_path = append_path( path, data.cFileName, &len )))
2413  {
2415  FindClose( handle );
2416  goto done;
2417  }
2418 
2419  if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
2420  {
2421  if (push_dir( dirstack, new_path, len )) continue;
2422  heap_free( new_path );
2423  FindClose( handle );
2425  goto done;
2426  }
2427  rec = (struct record_datafile *)(table->data + offset);
2428  rec->name = build_name( root[0], new_path );
2429  rec->version = get_file_version( rec->name );
2430  heap_free( new_path );
2431  if (!match_row( table, row, cond, &status ))
2432  {
2434  continue;
2435  }
2436  else if (num_expected_rows && row == num_expected_rows - 1)
2437  {
2438  row++;
2439  FindClose( handle );
2441  goto done;
2442  }
2443  offset += sizeof(*rec);
2444  row++;
2445  }
2446  while (FindNextFileW( handle, &data ));
2447  FindClose( handle );
2448  }
2449  if (!peek_dir( dirstack )) break;
2450  }
2451  }
2452 
2453 done:
2455  heap_free( glob );
2456  heap_free( path );
2457 
2458  TRACE("created %u rows\n", row);
2459  table->num_rows = row;
2460  return status;
2461 }
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
static void free_dirstack(struct dirstack *dirstack)
Definition: builtin.c:2131
UINT num_rows
static WCHAR * build_name(WCHAR drive, const WCHAR *path)
Definition: builtin.c:2201
GLintptr offset
Definition: glext.h:5920
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
const WCHAR * name
Definition: builtin.c:1046
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
static void clear_dirstack(struct dirstack *dirstack)
Definition: builtin.c:2124
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
#define DRIVE_FIXED
Definition: winbase.h:249
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static struct dirstack * alloc_dirstack(UINT size)
Definition: builtin.c:2103
fill_status
static WCHAR * pop_dir(struct dirstack *dirstack, UINT *len)
Definition: builtin.c:2163
BYTE * data
static WCHAR * append_path(const WCHAR *path, const WCHAR *segment, UINT *len)
Definition: builtin.c:2317
char ** glob(const char *v)
Definition: fake.c:36
unsigned int UINT
Definition: ndis.h:50
static WCHAR * build_glob(WCHAR drive, const WCHAR *path, UINT len)
Definition: builtin.c:2181
static const WCHAR dotdotW[]
Definition: directory.c:81
const WCHAR * version
Definition: builtin.c:1047
static UINT seed_dirs(struct dirstack *dirstack, const struct expr *cond, WCHAR root, UINT *count)
Definition: builtin.c:2268
static SERVICE_STATUS status
Definition: service.c:31
static const WCHAR dotW[]
Definition: directory.c:80
static BOOL push_dir(struct dirstack *dirstack, WCHAR *dir, UINT len)
Definition: builtin.c:2139
static WCHAR * get_file_version(const WCHAR *filename)
Definition: builtin.c:2337
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static const WCHAR * peek_dir(struct dirstack *dirstack)
Definition: builtin.c:2175
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
Definition: ps.c:97

◆ fill_desktopmonitor()

static enum fill_status fill_desktopmonitor ( struct table table,
const struct expr cond 
)
static

Definition at line 2474 of file builtin.c.

2475 {
2476  struct record_desktopmonitor *rec;
2478  UINT row = 0;
2479 
2480  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2481 
2482  rec = (struct record_desktopmonitor *)table->data;
2484 
2485  if (match_row( table, row, cond, &status )) row++;
2486 
2487  TRACE("created %u rows\n", row);
2488  table->num_rows = row;
2489  return status;
2490 }
UINT num_rows
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define TRACE(s)
Definition: solgame.cpp:4
static UINT32 get_pixelsperxlogicalinch(void)
Definition: builtin.c:2463
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
UINT32 pixelsperxlogicalinch
Definition: builtin.c:1051
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_directory()

static enum fill_status fill_directory ( struct table table,
const struct expr cond 
)
static

Definition at line 2492 of file builtin.c.

2493 {
2494  static const WCHAR dotW[] = {'.',0}, dotdotW[] = {'.','.',0};
2495  struct record_directory *rec;
2496  UINT i, len, row = 0, offset = 0, num_expected_rows;
2497  WCHAR *glob = NULL, *path = NULL, *new_path, root[] = {'A',':','\\',0};
2498  DWORD drives = GetLogicalDrives();
2500  HANDLE handle;
2501  struct dirstack *dirstack;
2503 
2504  if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED;
2505 
2506  dirstack = alloc_dirstack(2);
2507 
2508  for (i = 0; i < 26; i++)
2509  {
2510  if (!(drives & (1 << i))) continue;
2511 
2512  root[0] = 'A' + i;
2513  if (GetDriveTypeW( root ) != DRIVE_FIXED) continue;
2514 
2515  num_expected_rows = 0;
2516  if (!seed_dirs( dirstack, cond, root[0], &num_expected_rows )) clear_dirstack( dirstack );
2517 
2518  for (;;)
2519  {
2520  heap_free( glob );
2521  heap_free( path );
2522  path = pop_dir( dirstack, &len );
2523  if (!(glob = build_glob( root[0], path, len )))
2524  {
2526  goto done;
2527  }
2529  {
2530  do
2531  {
2532  if (!resize_table( table, row + 1, sizeof(*rec) ))
2533  {
2534  FindClose( handle );
2536  goto done;
2537  }
2538  if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
2539  !wcscmp( data.cFileName, dotW ) || !wcscmp( data.cFileName, dotdotW ))
2540  continue;
2541 
2542  if (!(new_path = append_path( path, data.cFileName, &len )))
2543  {
2544  FindClose( handle );
2546  goto done;
2547  }
2548 
2549  if (!(push_dir( dirstack, new_path, len )))
2550  {
2551  heap_free( new_path );
2552  FindClose( handle );
2554  goto done;
2555  }
2556  rec = (struct record_directory *)(table->data + offset);
2557  rec->accessmask = FILE_ALL_ACCESS;
2558  rec->name = build_name( root[0], new_path );
2559  heap_free( new_path );
2560  if (!match_row( table, row, cond, &status ))
2561  {
2563  continue;
2564  }
2565  else if (num_expected_rows && row == num_expected_rows - 1)
2566  {
2567  row++;
2568  FindClose( handle );
2570  goto done;
2571  }
2572  offset += sizeof(*rec);
2573  row++;
2574  }
2575  while (FindNextFileW( handle, &data ));
2576  FindClose( handle );
2577  }
2578  if (!peek_dir( dirstack )) break;
2579  }
2580  }
2581 
2582 done:
2584  heap_free( glob );
2585  heap_free( path );
2586 
2587  TRACE("created %u rows\n", row);
2588  table->num_rows = row;
2589  return status;
2590 }
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
static void free_dirstack(struct dirstack *dirstack)
Definition: builtin.c:2131
UINT num_rows
static WCHAR * build_name(WCHAR drive, const WCHAR *path)
Definition: builtin.c:2201
GLintptr offset
Definition: glext.h:5920
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
UINT32 accessmask
Definition: builtin.c:1055
smooth NULL
Definition: ftsmooth.c:416
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
const WCHAR * name
Definition: builtin.c:1056
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
static void clear_dirstack(struct dirstack *dirstack)
Definition: builtin.c:2124
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLsizei len
Definition: glext.h:6722
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
#define DRIVE_FIXED
Definition: winbase.h:249
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static struct dirstack * alloc_dirstack(UINT size)
Definition: builtin.c:2103
fill_status
static WCHAR * pop_dir(struct dirstack *dirstack, UINT *len)
Definition: builtin.c:2163
BYTE * data
static WCHAR * append_path(const WCHAR *path, const WCHAR *segment, UINT *len)
Definition: builtin.c:2317
char ** glob(const char *v)
Definition: fake.c:36
unsigned int UINT
Definition: ndis.h:50
static WCHAR * build_glob(WCHAR drive, const WCHAR *path, UINT len)
Definition: builtin.c:2181
static const WCHAR dotdotW[]
Definition: directory.c:81
static UINT seed_dirs(struct dirstack *dirstack, const struct expr *cond, WCHAR root, UINT *count)
Definition: builtin.c:2268
static SERVICE_STATUS status
Definition: service.c:31
static const WCHAR dotW[]
Definition: directory.c:80
static BOOL push_dir(struct dirstack *dirstack, WCHAR *dir, UINT len)
Definition: builtin.c:2139
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static const WCHAR * peek_dir(struct dirstack *dirstack)
Definition: builtin.c:2175
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
Definition: ps.c:97

◆ fill_diskdrive()

static enum fill_status fill_diskdrive ( struct table table,
const struct expr cond 
)
static

Definition at line 2614 of file builtin.c.

2615 {
2616  static const WCHAR fmtW[] =
2617  {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','%','u',0};
2618  WCHAR device_id[ARRAY_SIZE( fmtW ) + 10], root[] = {'A',':','\\',0};
2619  struct record_diskdrive *rec;
2620  UINT i, row = 0, offset = 0, index = 0, type;
2621  UINT64 size = 1024 * 1024 * 1024;
2622  DWORD drives = GetLogicalDrives();
2624 
2625  if (!resize_table( table, 2, sizeof(*rec) )) return FILL_STATUS_FAILED;
2626 
2627  for (i = 0; i < 26; i++)
2628  {
2629  if (drives & (1 << i))
2630  {
2631  root[0] = 'A' + i;
2632  type = GetDriveTypeW( root );
2633  if (type != DRIVE_FIXED && type != DRIVE_REMOVABLE)
2634  continue;
2635 
2636  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2637 
2638  rec = (struct record_diskdrive *)(table->data + offset);
2639  swprintf( device_id, fmtW, index );
2640  rec->device_id = heap_strdupW( device_id );
2641  rec->index = index++;
2645  rec->model = diskdrive_modelW;
2648  get_freespace( root, &size );
2649  rec->size = size;
2650  if (!match_row( table, row, cond, &status ))
2651  {
2653  continue;
2654  }
2655  offset += sizeof(*rec);
2656  row++;
2657  }
2658  }
2659  TRACE("created %u rows\n", row);
2660  table->num_rows = row;
2661  return status;
2662 }
const WCHAR * manufacturer
Definition: builtin.c:1063
const WCHAR * mediatype
Definition: builtin.c:1064
static UINT64 get_freespace(const WCHAR *dir, UINT64 *disksize)
Definition: builtin.c:2592
UINT num_rows
GLintptr offset
Definition: glext.h:5920
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
const WCHAR * device_id
Definition: builtin.c:1060
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define DRIVE_REMOVABLE
Definition: winbase.h:248
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
static const WCHAR diskdrive_mediatype_fixedW[]
Definition: builtin.c:934
GLuint index
Definition: glext.h:6031
const WCHAR * pnpdevice_id
Definition: builtin.c:1066
static const WCHAR diskdrive_modelW[]
Definition: builtin.c:938
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
static const WCHAR diskdrive_pnpdeviceidW[]
Definition: builtin.c:940
const WCHAR * interfacetype
Definition: builtin.c:1062
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
static const WCHAR diskdrive_interfacetypeW[]
Definition: builtin.c:930
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
#define DRIVE_FIXED
Definition: winbase.h:249
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
const WCHAR * serialnumber
Definition: builtin.c:1067
fill_status
BYTE * data
#define ARRAY_SIZE(a)
Definition: main.h:24
static const WCHAR diskdrive_mediatype_removableW[]
Definition: builtin.c:936
unsigned int UINT
Definition: ndis.h:50
static const WCHAR diskdrive_manufacturerW[]
Definition: builtin.c:932
unsigned long long UINT64
const WCHAR * model
Definition: builtin.c:1065
static SERVICE_STATUS status
Definition: service.c:31
static const WCHAR diskdrive_serialW[]
Definition: builtin.c:942
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_diskdrivetodiskpartition()

static enum fill_status fill_diskdrivetodiskpartition ( struct table table,
const struct expr cond 
)
static

Definition at line 2728 of file builtin.c.

2729 {
2730  struct record_diskdrivetodiskpartition *rec;
2731  UINT i, row = 0, offset = 0, count = 0;
2733  struct association *assoc;
2734 
2735  if (!(assoc = get_diskdrivetodiskpartition_pairs( &count ))) return FILL_STATUS_FAILED;
2736  if (!count)
2737  {
2738  free_assocations( assoc, count );
2739  return FILL_STATUS_UNFILTERED;
2740  }
2741  if (!resize_table( table, count, sizeof(*rec) ))
2742  {
2743  free_assocations( assoc, count );
2744  return FILL_STATUS_FAILED;
2745  }
2746 
2747  for (i = 0; i < count; i++)
2748  {
2749  rec = (struct record_diskdrivetodiskpartition *)(table->data + offset);
2750  rec->antecedent = assoc[i].ref;
2751  rec->dependent = assoc[i].ref2;
2752  if (!match_row( table, row, cond, &status ))
2753  {
2755  continue;
2756  }
2757  offset += sizeof(*rec);
2758  row++;
2759  }
2760 
2761  heap_free( assoc );
2762 
2763  TRACE("created %u rows\n", row);
2764  table->num_rows = row;
2765  return status;
2766 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT num_rows
GLintptr offset
Definition: glext.h:5920
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
WCHAR * ref2
Definition: builtin.c:2667
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
WCHAR * ref
Definition: builtin.c:2666
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static void free_assocations(struct association *assoc, UINT count)
Definition: builtin.c:2670
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: ps.c:97
static struct association * get_diskdrivetodiskpartition_pairs(UINT *count)
Definition: builtin.c:2682

◆ fill_diskpartition()

static enum fill_status fill_diskpartition ( struct table table,
const struct expr cond 
)
static

Definition at line 2778 of file builtin.c.

2779 {
2780  static const WCHAR fmtW[] =
2781  {'D','i','s','k',' ','#','%','u',',',' ','P','a','r','t','i','t','i','o','n',' ','#','0',0};
2782  WCHAR device_id[32], root[] = {'A',':','\\',0};
2783  struct record_diskpartition *rec;
2784  UINT i, row = 0, offset = 0, type, index = 0;
2785  UINT64 size = 1024 * 1024 * 1024;
2786  DWORD drives = GetLogicalDrives();
2788 
2789  if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED;
2790 
2791  for (i = 0; i < 26; i++)
2792  {
2793  if (drives & (1 << i))
2794  {
2795  root[0] = 'A' + i;
2796  type = GetDriveTypeW( root );
2797  if (type != DRIVE_FIXED && type != DRIVE_REMOVABLE)
2798  continue;
2799 
2800  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2801 
2802  rec = (struct record_diskpartition *)(table->data + offset);
2803  rec->bootable = (i == 2) ? -1 : 0;
2804  rec->bootpartition = (i == 2) ? -1 : 0;
2805  swprintf( device_id, fmtW, index );
2806  rec->device_id = heap_strdupW( device_id );
2807  rec->diskindex = index++;
2808  rec->index = 0;
2810  get_freespace( root, &size );
2811  rec->size = size;
2812  rec->startingoffset = 0;
2813  rec->type = get_filesystem( root );
2814  if (!match_row( table, row, cond, &status ))
2815  {
2817  continue;
2818  }
2819  offset += sizeof(*rec);
2820  row++;
2821  }
2822  }
2823  TRACE("created %u rows\n", row);
2824  table->num_rows = row;
2825  return status;
2826 }
static UINT64 get_freespace(const WCHAR *dir, UINT64 *disksize)
Definition: builtin.c:2592
UINT num_rows
GLintptr offset
Definition: glext.h:5920
const WCHAR * pnpdevice_id
Definition: builtin.c:1082
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static WCHAR * get_filesystem(const WCHAR *root)
Definition: builtin.c:2768
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define DRIVE_REMOVABLE
Definition: winbase.h:248
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
#define DRIVE_FIXED
Definition: winbase.h:249
const WCHAR * type
Definition: builtin.c:1085
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
unsigned long long UINT64
const WCHAR * device_id
Definition: builtin.c:1079
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_displaycontrollerconfig()

static enum fill_status fill_displaycontrollerconfig ( struct table table,
const struct expr cond 
)
static

Definition at line 2841 of file builtin.c.

2842 {
2843  struct record_displaycontrollerconfig *rec;
2844  UINT row = 0, hres = 1024, vres = 768;
2846 
2847  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2848 
2849  rec = (struct record_displaycontrollerconfig *)table->data;
2850  rec->bitsperpixel = get_bitsperpixel( &hres, &vres );
2852  rec->horizontalresolution = hres;
2854  rec->verticalresolution = vres;
2855  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
2856  else row++;
2857 
2858  TRACE("created %u rows\n", row);
2859  table->num_rows = row;
2860  return status;
2861 }
static const WCHAR videocontroller_deviceidW[]
Definition: builtin.c:972
UINT num_rows
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
static UINT32 get_bitsperpixel(UINT *hres, UINT *vres)
Definition: builtin.c:2828
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_ip4routetable()

static enum fill_status fill_ip4routetable ( struct table table,
const struct expr cond 
)
static

Definition at line 2874 of file builtin.c.

2875 {
2876  struct record_ip4routetable *rec;
2877  UINT i, row = 0, offset = 0, size = 0;
2878  MIB_IPFORWARDTABLE *forwards;
2880 
2882  if (!(forwards = heap_alloc( size ))) return FILL_STATUS_FAILED;
2883  if (GetIpForwardTable( forwards, &size, TRUE ))
2884  {
2885  heap_free( forwards );
2886  return FILL_STATUS_FAILED;
2887  }
2888  if (!resize_table( table, max(forwards->dwNumEntries, 1), sizeof(*rec) ))
2889  {
2890  heap_free( forwards );
2891  return FILL_STATUS_FAILED;
2892  }
2893 
2894  for (i = 0; i < forwards->dwNumEntries; i++)
2895  {
2896  rec = (struct record_ip4routetable *)(table->data + offset);
2897 
2898  rec->destination = get_ip4_string( ntohl(forwards->table[i].dwForwardDest) );
2899  rec->interfaceindex = forwards->table[i].dwForwardIfIndex;
2900  rec->nexthop = get_ip4_string( ntohl(forwards->table[i].dwForwardNextHop) );
2901 
2902  if (!match_row( table, row, cond, &status ))
2903  {
2905  continue;
2906  }
2907  offset += sizeof(*rec);
2908  row++;
2909  }
2910  TRACE("created %u rows\n", row);
2911  table->num_rows = row;
2912 
2913  heap_free( forwards );
2914  return status;
2915 }
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
UINT num_rows
GLintptr offset
Definition: glext.h:5920
const WCHAR * destination
Definition: builtin.c:1097
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
IF_INDEX dwForwardIfIndex
Definition: ipmib.h:75
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
DWORD dwForwardNextHop
Definition: ipmib.h:74
static WCHAR * get_ip4_string(DWORD addr)
Definition: builtin.c:2863
DWORD dwNumEntries
Definition: ipmib.h:97
DWORD dwForwardDest
Definition: ipmib.h:71
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
MIB_IPFORWARDROW table[1]
Definition: ipmib.h:98
fill_status
DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSize, BOOL bOrder)
BYTE * data
unsigned int UINT
Definition: ndis.h:50
const WCHAR * nexthop
Definition: builtin.c:1099
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ntohl(x)
Definition: module.h:203
Definition: ps.c:97

◆ fill_logicaldisk()

static enum fill_status fill_logicaldisk ( struct table table,
const struct expr cond 
)
static

Definition at line 2934 of file builtin.c.

2935 {
2936  static const WCHAR fmtW[] = {'%','c',':',0};
2937  WCHAR device_id[3], root[] = {'A',':','\\',0};
2938  struct record_logicaldisk *rec;
2939  UINT i, row = 0, offset = 0, type;
2940  UINT64 size = 1024 * 1024 * 1024;
2941  DWORD drives = GetLogicalDrives();
2943 
2944  if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED;
2945 
2946  for (i = 0; i < 26; i++)
2947  {
2948  if (drives & (1 << i))
2949  {
2950  root[0] = 'A' + i;
2951  type = GetDriveTypeW( root );
2952  if (type != DRIVE_FIXED && type != DRIVE_CDROM && type != DRIVE_REMOVABLE)
2953  continue;
2954 
2955  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2956 
2957  rec = (struct record_logicaldisk *)(table->data + offset);
2958  swprintf( device_id, fmtW, 'A' + i );
2959  rec->device_id = heap_strdupW( device_id );
2960  rec->drivetype = type;
2961  rec->filesystem = get_filesystem( root );
2962  rec->freespace = get_freespace( root, &size );
2963  rec->name = heap_strdupW( device_id );
2964  rec->size = size;
2965  rec->volumename = get_volumename( root );
2967  if (!match_row( table, row, cond, &status ))
2968  {
2970  continue;
2971  }
2972  offset += sizeof(*rec);
2973  row++;
2974  }
2975  }
2976  TRACE("created %u rows\n", row);
2977  table->num_rows = row;
2978  return status;
2979 }
static UINT64 get_freespace(const WCHAR *dir, UINT64 *disksize)
Definition: builtin.c:2592
UINT num_rows
GLintptr offset
Definition: glext.h:5920
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static WCHAR * get_filesystem(const WCHAR *root)
Definition: builtin.c:2768
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
#define DRIVE_REMOVABLE
Definition: winbase.h:248
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define DRIVE_CDROM
Definition: machpc98.h:115
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
const WCHAR * device_id
Definition: builtin.c:1103
const WCHAR * name
Definition: builtin.c:1107
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
static WCHAR * get_volumeserialnumber(const WCHAR *root)
Definition: builtin.c:2923
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
#define DRIVE_FIXED
Definition: winbase.h:249
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
const WCHAR * volumeserialnumber
Definition: builtin.c:1110
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static WCHAR * get_volumename(const WCHAR *root)
Definition: builtin.c:2917
const WCHAR * filesystem
Definition: builtin.c:1105
unsigned long long UINT64
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
const WCHAR * volumename
Definition: builtin.c:1109
Definition: ps.c:97

◆ fill_logicaldisktopartition()

static enum fill_status fill_logicaldisktopartition ( struct table table,
const struct expr cond 
)
static

Definition at line 3029 of file builtin.c.

3030 {
3031  struct record_logicaldisktopartition *rec;
3032  UINT i, row = 0, offset = 0, count = 0;
3034  struct association *assoc;
3035 
3036  if (!(assoc = get_logicaldisktopartition_pairs( &count ))) return FILL_STATUS_FAILED;
3037  if (!count)
3038  {
3039  free_assocations( assoc, count );
3040  return FILL_STATUS_UNFILTERED;
3041  }
3042  if (!resize_table( table, count, sizeof(*rec) ))
3043  {
3044  free_assocations( assoc, count );
3045  return FILL_STATUS_FAILED;
3046  }
3047 
3048  for (i = 0; i < count; i++)
3049  {
3050  rec = (struct record_logicaldisktopartition *)(table->data + offset);
3051  rec->antecedent = assoc[i].ref;
3052  rec->dependent = assoc[i].ref2;
3053  if (!match_row( table, row, cond, &status ))
3054  {
3056  continue;
3057  }
3058  offset += sizeof(*rec);
3059  row++;
3060  }
3061 
3062  heap_free( assoc );
3063 
3064  TRACE("created %u rows\n", row);
3065  table->num_rows = row;
3066  return status;
3067 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT num_rows
GLintptr offset
Definition: glext.h:5920
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
WCHAR * ref2
Definition: builtin.c:2667
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
WCHAR * ref
Definition: builtin.c:2666
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static void free_assocations(struct association *assoc, UINT count)
Definition: builtin.c:2670
static SERVICE_STATUS status
Definition: service.c:31
static struct association * get_logicaldisktopartition_pairs(UINT *count)
Definition: builtin.c:2981
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: ps.c:97

◆ fill_networkadapter()

static enum fill_status fill_networkadapter ( struct table table,
const struct expr cond 
)
static

Definition at line 3126 of file builtin.c.

3127 {
3128  static const WCHAR fmtW[] = {'%','u',0};
3129  WCHAR device_id[11];
3130  struct record_networkadapter *rec;
3131  IP_ADAPTER_ADDRESSES *aa, *buffer;
3132  UINT row = 0, offset = 0, count = 0;
3133  DWORD size = 0, ret;
3134  int adaptertypeid, physical;
3136 
3137  ret = GetAdaptersAddresses( AF_UNSPEC, 0, NULL, NULL, &size );
3139 
3140  if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
3141  if (GetAdaptersAddresses( AF_UNSPEC, 0, NULL, buffer, &size ))
3142  {
3143  heap_free( buffer );
3144  return FILL_STATUS_FAILED;
3145  }
3146  for (aa = buffer; aa; aa = aa->Next)
3147  {
3148  if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
3149  }
3150  if (!resize_table( table, count, sizeof(*rec) ))
3151  {
3152  heap_free( buffer );
3153  return FILL_STATUS_FAILED;
3154  }
3155  for (aa = buffer; aa; aa = aa->Next)
3156  {
3157  if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
3158 
3159  rec = (struct record_networkadapter *)(table->data + offset);
3160  swprintf( device_id, fmtW, aa->u.s.IfIndex );
3161  rec->adaptertype = get_adaptertype( aa->IfType, &adaptertypeid, &physical );
3163  rec->description = heap_strdupW( aa->Description );
3164  rec->device_id = heap_strdupW( device_id );
3165  rec->index = aa->u.s.IfIndex;
3166  rec->interface_index = aa->u.s.IfIndex;
3167  rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
3169  rec->name = heap_strdupW( aa->FriendlyName );
3170  rec->netconnection_status = get_connection_status( aa->OperStatus );
3171  rec->physicaladapter = physical;
3173  rec->speed = 1000000;
3174  if (!match_row( table, row, cond, &status ))
3175  {
3177  continue;
3178  }
3179  offset += sizeof(*rec);
3180  row++;
3181  }
3182  TRACE("created %u rows\n", row);
3183  table->num_rows = row;
3184 
3185  heap_free( buffer );
3186  return status;
3187 }
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:185
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT num_rows
GLintptr offset
Definition: glext.h:5920
GLuint buffer
Definition: glext.h:5915
UINT16 netconnection_status
Definition: builtin.c:1128
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
const WCHAR * mac_address
Definition: builtin.c:1125
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
static WCHAR * get_mac_address(const BYTE *addr, DWORD len)
Definition: builtin.c:3083
#define IF_TYPE_SOFTWARE_LOOPBACK
Definition: ipifcons.h:44
const WCHAR * name
Definition: builtin.c:1127
smooth NULL
Definition: ftsmooth.c:416
static UINT16 get_connection_status(IF_OPER_STATUS status)
Definition: builtin.c:3069
#define AF_UNSPEC
Definition: winsock.h:344
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
const WCHAR * pnpdevice_id
Definition: builtin.c:1130
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
const WCHAR * adaptertype
Definition: builtin.c:1119
int ret
const WCHAR * description
Definition: builtin.c:1121
fill_status
const WCHAR * device_id
Definition: builtin.c:1122
BYTE * data
static const WCHAR * get_adaptertype(DWORD type, int *id, int *physical)
Definition: builtin.c:3094
unsigned int UINT
Definition: ndis.h:50
static const WCHAR networkadapter_pnpdeviceidW[]
Definition: builtin.c:944
static SERVICE_STATUS status
Definition: service.c:31
const WCHAR * manufacturer
Definition: builtin.c:1126
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static const WCHAR compsys_manufacturerW[]
Definition: builtin.c:915
Definition: ps.c:97

◆ fill_networkadapterconfig()

static enum fill_status fill_networkadapterconfig ( struct table table,
const struct expr cond 
)
static

Definition at line 3370 of file builtin.c.

3371 {
3372  struct record_networkadapterconfig *rec;
3373  IP_ADAPTER_ADDRESSES *aa, *buffer;
3374  UINT row = 0, offset = 0, count = 0;
3375  DWORD size = 0, ret;
3377 
3378  ret = GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, NULL, &size );
3380 
3381  if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
3382  if (GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, buffer, &size ))
3383  {
3384  heap_free( buffer );
3385  return FILL_STATUS_FAILED;
3386  }
3387  for (aa = buffer; aa; aa = aa->Next)
3388  {
3389  if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
3390  }
3391  if (!resize_table( table, count, sizeof(*rec) ))
3392  {
3393  heap_free( buffer );
3394  return FILL_STATUS_FAILED;
3395  }
3396  for (aa = buffer; aa; aa = aa->Next)
3397  {
3398  if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
3399 
3400  rec = (struct record_networkadapterconfig *)(table->data + offset);
3401  rec->defaultipgateway = get_defaultipgateway( aa->FirstGatewayAddress );
3402  rec->description = heap_strdupW( aa->Description );
3403  rec->dhcpenabled = -1;
3404  rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress );
3405  rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress );
3406  rec->index = aa->u.s.IfIndex;
3407 #ifndef __REACTOS__
3408  rec->ipaddress = get_ipaddress( aa->FirstUnicastAddress );
3409 #endif
3410  rec->ipconnectionmetric = 20;
3411  rec->ipenabled = -1;
3412 #ifndef __REACTOS__
3413  rec->ipsubnet = get_ipsubnet( aa->FirstUnicastAddress );
3414 #endif
3415  rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
3416  rec->settingid = get_settingid( rec->index );
3417  if (!match_row( table, row, cond, &status ))
3418  {
3420  continue;
3421  }
3422  offset += sizeof(*rec);
3423  row++;
3424  }
3425  TRACE("created %u rows\n", row);
3426  table->num_rows = row;
3427 
3428  heap_free( buffer );
3429  return status;
3430 }
static struct array * get_dnsserversearchorder(IP_ADAPTER_DNS_SERVER_ADDRESS *list)
Definition: builtin.c:3232
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:185
static struct array * get_ipsubnet(IP_ADAPTER_UNICAST_ADDRESS_LH *list)
Definition: builtin.c:3302
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT num_rows
const WCHAR * description
Definition: builtin.c:1136
const struct array * defaultipgateway
Definition: builtin.c:1135
GLintptr offset
Definition: glext.h:5920
GLuint buffer
Definition: glext.h:5915
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
static WCHAR * get_dnshostname(IP_ADAPTER_UNICAST_ADDRESS *addr)
Definition: builtin.c:3189
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
const WCHAR * mac_address
Definition: builtin.c:1145
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
static WCHAR * get_mac_address(const BYTE *addr, DWORD len)
Definition: builtin.c:3083
#define IF_TYPE_SOFTWARE_LOOPBACK
Definition: ipifcons.h:44
smooth NULL
Definition: ftsmooth.c:416
static struct array * get_ipaddress(IP_ADAPTER_UNICAST_ADDRESS_LH *list)
Definition: builtin.c:3269
#define AF_UNSPEC
Definition: winsock.h:344
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
unsigned long DWORD
Definition: ntddk_ex.h:95
const struct array * dnsserversearchorder
Definition: builtin.c:1139
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
const WCHAR * dnshostname
Definition: builtin.c:1138
int ret
fill_status
BYTE * data
const struct array * ipsubnet
Definition: builtin.c:1144
unsigned int UINT
Definition: ndis.h:50
static WCHAR * get_settingid(UINT32 index)
Definition: builtin.c:3358
static struct array * get_defaultipgateway(IP_ADAPTER_GATEWAY_ADDRESS *list)
Definition: builtin.c:3199
const WCHAR * settingid
Definition: builtin.c:1146
static SERVICE_STATUS status
Definition: service.c:31
const struct array * ipaddress
Definition: builtin.c:1141
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: ps.c:97

◆ fill_operatingsystem()

static enum fill_status fill_operatingsystem ( struct table table,
const struct expr cond 
)
static

Definition at line 4040 of file builtin.c.

4041 {
4042  static const WCHAR wineprojectW[] = {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
4043  struct record_operatingsystem *rec;
4045  OSVERSIONINFOEXW ver;
4046  UINT row = 0;
4047 
4048  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
4049 
4050  ver.dwOSVersionInfoSize = sizeof(ver);
4051  GetVersionExW( (OSVERSIONINFOW *)&ver );
4052 
4053  rec = (struct record_operatingsystem *)table->data;
4054  rec->buildnumber = get_osbuildnumber( &ver );
4055  rec->caption = get_oscaption( &ver );
4056  rec->codeset = get_codeset();
4057  rec->countrycode = get_countrycode();
4058  rec->csdversion = ver.szCSDVersion[0] ? heap_strdupW( ver.szCSDVersion ) : NULL;
4059  rec->csname = get_computername();
4065  rec->locale = get_locale();
4066  rec->manufacturer = wineprojectW;
4067  rec->name = get_osname( rec->caption );
4068 #ifndef __REACTOS__
4070 #endif
4073  rec->osproductsuite = 2461140; /* Windows XP Professional */
4074  rec->ostype = 18; /* WINNT */
4075  rec->primary = -1;
4079  rec->suitemask = 272; /* Single User + Terminal */
4081  rec->systemdrive = get_systemdrive();
4084  rec->version = get_osversion( &ver );
4085  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
4086  else row++;
4087 
4088  TRACE("created %u rows\n", row);
4089  table->num_rows = row;
4090  return status;
4091 }
static UINT64 get_available_physical_memory(void)
Definition: builtin.c:1931
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:265
static UINT64 get_total_physical_memory(void)
Definition: builtin.c:1922
const WCHAR * locale
Definition: builtin.c:1161
static const WCHAR * get_osarchitecture(void)
Definition: builtin.c:3688
UINT num_rows
const WCHAR * countrycode
Definition: builtin.c:1153
static WCHAR * get_systemdirectory(void)
Definition: builtin.c:3906
const WCHAR * systemdrive
Definition: builtin.c:1175
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
const WCHAR * serialnumber
Definition: builtin.c:1170
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
UINT64 totalvisiblememorysize
Definition: builtin.c:1177
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
const WCHAR * installdate
Definition: builtin.c:1158
const WCHAR * buildnumber
Definition: builtin.c:1150
const WCHAR * csdversion
Definition: builtin.c:1154
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
const WCHAR * codeset
Definition: builtin.c:1152
static INT16 get_currenttimezone(void)
Definition: builtin.c:4031
smooth NULL
Definition: ftsmooth.c:416
static WCHAR * get_lastbootuptime(void)
Definition: builtin.c:3865
const WCHAR * version
Definition: builtin.c:1178
#define TRACE(s)
Definition: solgame.cpp:4
const WCHAR * localdatetime
Definition: builtin.c:1160
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * name
Definition: builtin.c:1163
LANGID WINAPI GetSystemDefaultLangID(void)
Definition: lang.c:751
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
const WCHAR * caption
Definition: builtin.c:1151
const WCHAR * lastbootuptime
Definition: builtin.c:1159
UINT64 totalvirtualmemorysize
Definition: builtin.c:1176
WCHAR szCSDVersion[128]
Definition: rtltypes.h:270
static WCHAR * get_oscaption(OSVERSIONINFOEXW *ver)
Definition: builtin.c:3950
const WCHAR * osarchitecture
Definition: builtin.c:1165
static WCHAR * get_codeset(void)
Definition: builtin.c:3924
fill_status
static const WCHAR os_installdateW[]
Definition: builtin.c:952
const WCHAR * manufacturer
Definition: builtin.c:1162
static WCHAR * get_systemdrive(void)
Definition: builtin.c:3917
BYTE * data
USHORT wServicePackMajor
Definition: rtltypes.h:271
static WCHAR * get_osname(const WCHAR *caption)
Definition: builtin.c:4003
static const WCHAR os_serialnumberW[]
Definition: builtin.c:954
static DWORD get_operatingsystemsku(void)
Definition: builtin.c:4024
unsigned int UINT
Definition: ndis.h:50
static WCHAR * get_osversion(OSVERSIONINFOEXW *ver)
Definition: builtin.c:4016
static WCHAR * get_locale(void)
Definition: builtin.c:3937
const WCHAR * systemdirectory
Definition: builtin.c:1174
static WCHAR * get_osbuildnumber(OSVERSIONINFOEXW *ver)
Definition: builtin.c:3943
static WCHAR * get_computername(void)
Definition: builtin.c:1940
static WCHAR * get_localdatetime(void)
Definition: builtin.c:3881
const WCHAR * csname
Definition: builtin.c:1155
static WCHAR * get_countrycode(void)
Definition: builtin.c:3931
static SERVICE_STATUS status
Definition: service.c:31
USHORT wServicePackMinor
Definition: rtltypes.h:272
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_physicalmemory()

static enum fill_status fill_physicalmemory ( struct table table,
const struct expr cond 
)
static

Definition at line 3432 of file builtin.c.

3433 {
3434  static const WCHAR dimm0W[] = {'D','I','M','M',' ','0',0};
3435  struct record_physicalmemory *rec;
3437  UINT row = 0;
3438 
3439  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
3440 
3441  rec = (struct record_physicalmemory *)table->data;
3443  rec->configuredclockspeed = 0;
3444  rec->devicelocator = dimm0W;
3445  rec->memorytype = 9; /* RAM */
3446  rec->partnumber = NULL;
3447  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
3448  else row++;
3449 
3450  TRACE("created %u rows\n", row);
3451  table->num_rows = row;
3452  return status;
3453 }
static UINT64 get_total_physical_memory(void)
Definition: builtin.c:1922
UINT num_rows
const WCHAR * devicelocator
Definition: builtin.c:1198
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
UINT32 configuredclockspeed
Definition: builtin.c:1197
__wchar_t WCHAR
Definition: xmlstorage.h:180
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
fill_status
const WCHAR * partnumber
Definition: builtin.c:1200
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static SERVICE_STATUS status
Definition: service.c:31
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: ps.c:97

◆ fill_pnpentity()

static enum fill_status fill_pnpentity ( struct table table,
const struct expr cond 
)
static

Definition at line 3455 of file builtin.c.

3456 {
3457  struct record_pnpentity *rec;
3459  HDEVINFO device_info_set;
3460  SP_DEVINFO_DATA devinfo = {0};
3461  DWORD idx;
3462 
3464 
3465  devinfo.cbSize = sizeof(devinfo);
3466 
3467  idx = 0;
3468  while (SetupDiEnumDeviceInfo( device_info_set, idx++, &devinfo ))
3469  {
3470  /* noop */
3471  }
3472 
3473  resize_table( table, idx, sizeof(*rec) );
3474  table->num_rows = 0;
3475  rec = (struct record_pnpentity *)table->data;
3476 
3477  idx = 0;
3478  while (SetupDiEnumDeviceInfo( device_info_set, idx++, &devinfo ))
3479  {
3481  if (SetupDiGetDeviceInstanceIdW( device_info_set, &devinfo, device_id,
3483  {
3484  rec->device_id = heap_strdupW( device_id );
3485 
3486  table->num_rows++;
3487  if (!match_row( table, table->num_rows - 1, cond, &status ))
3488  {
3490  table->num_rows--;
3491  }
3492  else
3493  rec++;
3494  }
3495  }
3496 
3497  SetupDiDestroyDeviceInfoList( device_info_set );
3498 
3499  return status;
3500 }
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO devinfo, DWORD index, PSP_DEVINFO_DATA info)
Definition: devinst.c:1792
HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID *class, LPCWSTR enumstr, HWND parent, DWORD flags)
Definition: devinst.c:2297
UINT num_rows
static BOOL resize_table(struct table *table, UINT row_count, UINT row_size)
Definition: builtin.c:1462
void free_row_values(const struct table *table, UINT row)
Definition: table.c:292
while(1)
Definition: macro.lex.yy.c:740
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2898
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL match_row(const struct table *table, UINT row, const struct expr *cond, enum fill_status *status)
Definition: builtin.c:1443
#define DIGCF_ALLCLASSES
Definition: setupapi.h:172
fill_status
BYTE * data
#define ARRAY_SIZE(a)
Definition: main.h:24
BOOL WINAPI SetupDiGetDeviceInstanceIdW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PWSTR DeviceInstanceId, DWORD DeviceInstanceIdSize, PDWORD RequiredSize)
Definition: devinst.c:1912
const WCHAR * device_id
Definition: builtin.c:1204
static SERVICE_STATUS status
Definition: service.c:31
Definition: