ReactOS  0.4.14-dev-608-gd495a4f
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 4542 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 4543 of file builtin.c.

◆ FLAVOR_ID

◆ HW_VENDOR_AMD

#define HW_VENDOR_AMD   0x1002

Definition at line 4450 of file builtin.c.

◆ HW_VENDOR_INTEL

#define HW_VENDOR_INTEL   0x8086

Definition at line 4453 of file builtin.c.

◆ HW_VENDOR_NVIDIA

#define HW_VENDOR_NVIDIA   0x10de

Definition at line 4451 of file builtin.c.

◆ HW_VENDOR_VMWARE

#define HW_VENDOR_VMWARE   0x15ad

Definition at line 4452 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 3635 of file builtin.c.

3636 {
3637  FIXME("\n");
3638 }
#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 4361 of file builtin.c.

4362 {
4363  struct array *dst;
4364  if (!(dst = heap_alloc( sizeof(*dst) ))) return NULL;
4365  if (!(dst->ptr = heap_alloc( src->count * src->elem_size )))
4366  {
4367  heap_free( dst );
4368  return NULL;
4369  }
4370  memcpy( dst->ptr, src->ptr, src->count * src->elem_size );
4371  dst->elem_size = src->elem_size;
4372  dst->count = src->count;
4373  return dst;
4374 }
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
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
#define DRIVE_CDROM
Definition: winbase.h:251
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  new_path = append_path( path, data.cFileName, &len );
2412 
2413  if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
2414  {
2415  if (push_dir( dirstack, new_path, len )) continue;
2416  heap_free( new_path );
2417  FindClose( handle );
2419  goto done;
2420  }
2421  rec = (struct record_datafile *)(table->data + offset);
2422  rec->name = build_name( root[0], new_path );
2423  rec->version = get_file_version( rec->name );
2424  if (!match_row( table, row, cond, &status ))
2425  {
2427  continue;
2428  }
2429  else if (num_expected_rows && row == num_expected_rows - 1)
2430  {
2431  row++;
2432  FindClose( handle );
2434  goto done;
2435  }
2436  offset += sizeof(*rec);
2437  row++;
2438  }
2439  while (FindNextFileW( handle, &data ));
2440  FindClose( handle );
2441  }
2442  if (!peek_dir( dirstack )) break;
2443  }
2444  }
2445 
2446 done:
2448  heap_free( glob );
2449  heap_free( path );
2450 
2451  TRACE("created %u rows\n", row);
2452  table->num_rows = row;
2453  return status;
2454 }
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 2467 of file builtin.c.

2468 {
2469  struct record_desktopmonitor *rec;
2471  UINT row = 0;
2472 
2473  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2474 
2475  rec = (struct record_desktopmonitor *)table->data;
2477 
2478  if (match_row( table, row, cond, &status )) row++;
2479 
2480  TRACE("created %u rows\n", row);
2481  table->num_rows = row;
2482  return status;
2483 }
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:2456
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 2485 of file builtin.c.

2486 {
2487  static const WCHAR dotW[] = {'.',0}, dotdotW[] = {'.','.',0};
2488  struct record_directory *rec;
2489  UINT i, len, row = 0, offset = 0, num_expected_rows;
2490  WCHAR *glob = NULL, *path = NULL, *new_path, root[] = {'A',':','\\',0};
2491  DWORD drives = GetLogicalDrives();
2493  HANDLE handle;
2494  struct dirstack *dirstack;
2496 
2497  if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED;
2498 
2499  dirstack = alloc_dirstack(2);
2500 
2501  for (i = 0; i < 26; i++)
2502  {
2503  if (!(drives & (1 << i))) continue;
2504 
2505  root[0] = 'A' + i;
2506  if (GetDriveTypeW( root ) != DRIVE_FIXED) continue;
2507 
2508  num_expected_rows = 0;
2509  if (!seed_dirs( dirstack, cond, root[0], &num_expected_rows )) clear_dirstack( dirstack );
2510 
2511  for (;;)
2512  {
2513  heap_free( glob );
2514  heap_free( path );
2515  path = pop_dir( dirstack, &len );
2516  if (!(glob = build_glob( root[0], path, len )))
2517  {
2519  goto done;
2520  }
2522  {
2523  do
2524  {
2525  if (!resize_table( table, row + 1, sizeof(*rec) ))
2526  {
2527  FindClose( handle );
2529  goto done;
2530  }
2531  if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
2532  !wcscmp( data.cFileName, dotW ) || !wcscmp( data.cFileName, dotdotW ))
2533  continue;
2534 
2535  new_path = append_path( path, data.cFileName, &len );
2536  if (!(push_dir( dirstack, new_path, len )))
2537  {
2538  heap_free( new_path );
2539  FindClose( handle );
2541  goto done;
2542  }
2543  rec = (struct record_directory *)(table->data + offset);
2544  rec->accessmask = FILE_ALL_ACCESS;
2545  rec->name = build_name( root[0], new_path );
2546  if (!match_row( table, row, cond, &status ))
2547  {
2549  continue;
2550  }
2551  else if (num_expected_rows && row == num_expected_rows - 1)
2552  {
2553  row++;
2554  FindClose( handle );
2556  goto done;
2557  }
2558  offset += sizeof(*rec);
2559  row++;
2560  }
2561  while (FindNextFileW( handle, &data ));
2562  FindClose( handle );
2563  }
2564  if (!peek_dir( dirstack )) break;
2565  }
2566  }
2567 
2568 done:
2570  heap_free( glob );
2571  heap_free( path );
2572 
2573  TRACE("created %u rows\n", row);
2574  table->num_rows = row;
2575  return status;
2576 }
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 2600 of file builtin.c.

2601 {
2602  static const WCHAR fmtW[] =
2603  {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','%','u',0};
2604  WCHAR device_id[ARRAY_SIZE( fmtW ) + 10], root[] = {'A',':','\\',0};
2605  struct record_diskdrive *rec;
2606  UINT i, row = 0, offset = 0, index = 0, type;
2607  UINT64 size = 1024 * 1024 * 1024;
2608  DWORD drives = GetLogicalDrives();
2610 
2611  if (!resize_table( table, 2, sizeof(*rec) )) return FILL_STATUS_FAILED;
2612 
2613  for (i = 0; i < 26; i++)
2614  {
2615  if (drives & (1 << i))
2616  {
2617  root[0] = 'A' + i;
2618  type = GetDriveTypeW( root );
2619  if (type != DRIVE_FIXED && type != DRIVE_REMOVABLE)
2620  continue;
2621 
2622  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2623 
2624  rec = (struct record_diskdrive *)(table->data + offset);
2625  swprintf( device_id, fmtW, index );
2626  rec->device_id = heap_strdupW( device_id );
2627  rec->index = index++;
2631  rec->model = diskdrive_modelW;
2634  get_freespace( root, &size );
2635  rec->size = size;
2636  if (!match_row( table, row, cond, &status ))
2637  {
2639  continue;
2640  }
2641  offset += sizeof(*rec);
2642  row++;
2643  }
2644  }
2645  TRACE("created %u rows\n", row);
2646  table->num_rows = row;
2647  return status;
2648 }
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:2578
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 2714 of file builtin.c.

2715 {
2716  struct record_diskdrivetodiskpartition *rec;
2717  UINT i, row = 0, offset = 0, count = 0;
2719  struct association *assoc;
2720 
2721  if (!(assoc = get_diskdrivetodiskpartition_pairs( &count ))) return FILL_STATUS_FAILED;
2722  if (!count)
2723  {
2724  free_assocations( assoc, count );
2725  return FILL_STATUS_UNFILTERED;
2726  }
2727  if (!resize_table( table, count, sizeof(*rec) ))
2728  {
2729  free_assocations( assoc, count );
2730  return FILL_STATUS_FAILED;
2731  }
2732 
2733  for (i = 0; i < count; i++)
2734  {
2735  rec = (struct record_diskdrivetodiskpartition *)(table->data + offset);
2736  rec->antecedent = assoc[i].ref;
2737  rec->dependent = assoc[i].ref2;
2738  if (!match_row( table, row, cond, &status ))
2739  {
2741  continue;
2742  }
2743  offset += sizeof(*rec);
2744  row++;
2745  }
2746 
2747  heap_free( assoc );
2748 
2749  TRACE("created %u rows\n", row);
2750  table->num_rows = row;
2751  return status;
2752 }
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:2653
#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:2652
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static void free_assocations(struct association *assoc, UINT count)
Definition: builtin.c:2656
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:2668

◆ fill_diskpartition()

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

Definition at line 2764 of file builtin.c.

2765 {
2766  static const WCHAR fmtW[] =
2767  {'D','i','s','k',' ','#','%','u',',',' ','P','a','r','t','i','t','i','o','n',' ','#','0',0};
2768  WCHAR device_id[32], root[] = {'A',':','\\',0};
2769  struct record_diskpartition *rec;
2770  UINT i, row = 0, offset = 0, type, index = 0;
2771  UINT64 size = 1024 * 1024 * 1024;
2772  DWORD drives = GetLogicalDrives();
2774 
2775  if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED;
2776 
2777  for (i = 0; i < 26; i++)
2778  {
2779  if (drives & (1 << i))
2780  {
2781  root[0] = 'A' + i;
2782  type = GetDriveTypeW( root );
2783  if (type != DRIVE_FIXED && type != DRIVE_REMOVABLE)
2784  continue;
2785 
2786  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2787 
2788  rec = (struct record_diskpartition *)(table->data + offset);
2789  rec->bootable = (i == 2) ? -1 : 0;
2790  rec->bootpartition = (i == 2) ? -1 : 0;
2791  swprintf( device_id, fmtW, index );
2792  rec->device_id = heap_strdupW( device_id );
2793  rec->diskindex = index++;
2794  rec->index = 0;
2796  get_freespace( root, &size );
2797  rec->size = size;
2798  rec->startingoffset = 0;
2799  rec->type = get_filesystem( root );
2800  if (!match_row( table, row, cond, &status ))
2801  {
2803  continue;
2804  }
2805  offset += sizeof(*rec);
2806  row++;
2807  }
2808  }
2809  TRACE("created %u rows\n", row);
2810  table->num_rows = row;
2811  return status;
2812 }
static UINT64 get_freespace(const WCHAR *dir, UINT64 *disksize)
Definition: builtin.c:2578
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:2754
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 2827 of file builtin.c.

2828 {
2829  struct record_displaycontrollerconfig *rec;
2830  UINT row = 0, hres = 1024, vres = 768;
2832 
2833  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2834 
2835  rec = (struct record_displaycontrollerconfig *)table->data;
2836  rec->bitsperpixel = get_bitsperpixel( &hres, &vres );
2838  rec->horizontalresolution = hres;
2840  rec->verticalresolution = vres;
2841  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
2842  else row++;
2843 
2844  TRACE("created %u rows\n", row);
2845  table->num_rows = row;
2846  return status;
2847 }
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:2814
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 2860 of file builtin.c.

2861 {
2862  struct record_ip4routetable *rec;
2863  UINT i, row = 0, offset = 0, size = 0;
2864  MIB_IPFORWARDTABLE *forwards;
2866 
2868  if (!(forwards = heap_alloc( size ))) return FILL_STATUS_FAILED;
2869  if (GetIpForwardTable( forwards, &size, TRUE ))
2870  {
2871  heap_free( forwards );
2872  return FILL_STATUS_FAILED;
2873  }
2874  if (!resize_table( table, max(forwards->dwNumEntries, 1), sizeof(*rec) ))
2875  {
2876  heap_free( forwards );
2877  return FILL_STATUS_FAILED;
2878  }
2879 
2880  for (i = 0; i < forwards->dwNumEntries; i++)
2881  {
2882  rec = (struct record_ip4routetable *)(table->data + offset);
2883 
2884  rec->destination = get_ip4_string( ntohl(forwards->table[i].dwForwardDest) );
2885  rec->interfaceindex = forwards->table[i].dwForwardIfIndex;
2886  rec->nexthop = get_ip4_string( ntohl(forwards->table[i].dwForwardNextHop) );
2887 
2888  if (!match_row( table, row, cond, &status ))
2889  {
2891  continue;
2892  }
2893  offset += sizeof(*rec);
2894  row++;
2895  }
2896  TRACE("created %u rows\n", row);
2897  table->num_rows = row;
2898 
2899  heap_free( forwards );
2900  return status;
2901 }
#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:2849
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 2920 of file builtin.c.

2921 {
2922  static const WCHAR fmtW[] = {'%','c',':',0};
2923  WCHAR device_id[3], root[] = {'A',':','\\',0};
2924  struct record_logicaldisk *rec;
2925  UINT i, row = 0, offset = 0, type;
2926  UINT64 size = 1024 * 1024 * 1024;
2927  DWORD drives = GetLogicalDrives();
2929 
2930  if (!resize_table( table, 4, sizeof(*rec) )) return FILL_STATUS_FAILED;
2931 
2932  for (i = 0; i < 26; i++)
2933  {
2934  if (drives & (1 << i))
2935  {
2936  root[0] = 'A' + i;
2937  type = GetDriveTypeW( root );
2938  if (type != DRIVE_FIXED && type != DRIVE_CDROM && type != DRIVE_REMOVABLE)
2939  continue;
2940 
2941  if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
2942 
2943  rec = (struct record_logicaldisk *)(table->data + offset);
2944  swprintf( device_id, fmtW, 'A' + i );
2945  rec->device_id = heap_strdupW( device_id );
2946  rec->drivetype = type;
2947  rec->filesystem = get_filesystem( root );
2948  rec->freespace = get_freespace( root, &size );
2949  rec->name = heap_strdupW( device_id );
2950  rec->size = size;
2951  rec->volumename = get_volumename( root );
2953  if (!match_row( table, row, cond, &status ))
2954  {
2956  continue;
2957  }
2958  offset += sizeof(*rec);
2959  row++;
2960  }
2961  }
2962  TRACE("created %u rows\n", row);
2963  table->num_rows = row;
2964  return status;
2965 }
static UINT64 get_freespace(const WCHAR *dir, UINT64 *disksize)
Definition: builtin.c:2578
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:2754
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
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:2909
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
#define DRIVE_CDROM
Definition: winbase.h:251
unsigned int UINT
Definition: ndis.h:50
static WCHAR * get_volumename(const WCHAR *root)
Definition: builtin.c:2903
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 3015 of file builtin.c.

3016 {
3017  struct record_logicaldisktopartition *rec;
3018  UINT i, row = 0, offset = 0, count = 0;
3020  struct association *assoc;
3021 
3022  if (!(assoc = get_logicaldisktopartition_pairs( &count ))) return FILL_STATUS_FAILED;
3023  if (!count)
3024  {
3025  free_assocations( assoc, count );
3026  return FILL_STATUS_UNFILTERED;
3027  }
3028  if (!resize_table( table, count, sizeof(*rec) ))
3029  {
3030  free_assocations( assoc, count );
3031  return FILL_STATUS_FAILED;
3032  }
3033 
3034  for (i = 0; i < count; i++)
3035  {
3036  rec = (struct record_logicaldisktopartition *)(table->data + offset);
3037  rec->antecedent = assoc[i].ref;
3038  rec->dependent = assoc[i].ref2;
3039  if (!match_row( table, row, cond, &status ))
3040  {
3042  continue;
3043  }
3044  offset += sizeof(*rec);
3045  row++;
3046  }
3047 
3048  heap_free( assoc );
3049 
3050  TRACE("created %u rows\n", row);
3051  table->num_rows = row;
3052  return status;
3053 }
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:2653
#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:2652
fill_status
BYTE * data
unsigned int UINT
Definition: ndis.h:50
static void free_assocations(struct association *assoc, UINT count)
Definition: builtin.c:2656
static SERVICE_STATUS status
Definition: service.c:31
static struct association * get_logicaldisktopartition_pairs(UINT *count)
Definition: builtin.c:2967
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 3112 of file builtin.c.

3113 {
3114  static const WCHAR fmtW[] = {'%','u',0};
3115  WCHAR device_id[11];
3116  struct record_networkadapter *rec;
3117  IP_ADAPTER_ADDRESSES *aa, *buffer;
3118  UINT row = 0, offset = 0, count = 0;
3119  DWORD size = 0, ret;
3120  int adaptertypeid, physical;
3122 
3123  ret = GetAdaptersAddresses( AF_UNSPEC, 0, NULL, NULL, &size );
3125 
3126  if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
3127  if (GetAdaptersAddresses( AF_UNSPEC, 0, NULL, buffer, &size ))
3128  {
3129  heap_free( buffer );
3130  return FILL_STATUS_FAILED;
3131  }
3132  for (aa = buffer; aa; aa = aa->Next)
3133  {
3134  if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
3135  }
3136  if (!resize_table( table, count, sizeof(*rec) ))
3137  {
3138  heap_free( buffer );
3139  return FILL_STATUS_FAILED;
3140  }
3141  for (aa = buffer; aa; aa = aa->Next)
3142  {
3143  if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
3144 
3145  rec = (struct record_networkadapter *)(table->data + offset);
3146  swprintf( device_id, fmtW, aa->u.s.IfIndex );
3147  rec->adaptertype = get_adaptertype( aa->IfType, &adaptertypeid, &physical );
3149  rec->description = heap_strdupW( aa->Description );
3150  rec->device_id = heap_strdupW( device_id );
3151  rec->index = aa->u.s.IfIndex;
3152  rec->interface_index = aa->u.s.IfIndex;
3153  rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
3155  rec->name = heap_strdupW( aa->FriendlyName );
3156  rec->netconnection_status = get_connection_status( aa->OperStatus );
3157  rec->physicaladapter = physical;
3159  rec->speed = 1000000;
3160  if (!match_row( table, row, cond, &status ))
3161  {
3163  continue;
3164  }
3165  offset += sizeof(*rec);
3166  row++;
3167  }
3168  TRACE("created %u rows\n", row);
3169  table->num_rows = row;
3170 
3171  heap_free( buffer );
3172  return status;
3173 }
#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:3069
#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:3055
#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:3080
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 3356 of file builtin.c.

3357 {
3358  struct record_networkadapterconfig *rec;
3359  IP_ADAPTER_ADDRESSES *aa, *buffer;
3360  UINT row = 0, offset = 0, count = 0;
3361  DWORD size = 0, ret;
3363 
3364  ret = GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, NULL, &size );
3366 
3367  if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
3368  if (GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, buffer, &size ))
3369  {
3370  heap_free( buffer );
3371  return FILL_STATUS_FAILED;
3372  }
3373  for (aa = buffer; aa; aa = aa->Next)
3374  {
3375  if (aa->IfType != IF_TYPE_SOFTWARE_LOOPBACK) count++;
3376  }
3377  if (!resize_table( table, count, sizeof(*rec) ))
3378  {
3379  heap_free( buffer );
3380  return FILL_STATUS_FAILED;
3381  }
3382  for (aa = buffer; aa; aa = aa->Next)
3383  {
3384  if (aa->IfType == IF_TYPE_SOFTWARE_LOOPBACK) continue;
3385 
3386  rec = (struct record_networkadapterconfig *)(table->data + offset);
3387  rec->defaultipgateway = get_defaultipgateway( aa->FirstGatewayAddress );
3388  rec->description = heap_strdupW( aa->Description );
3389  rec->dhcpenabled = -1;
3390  rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress );
3391  rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress );
3392  rec->index = aa->u.s.IfIndex;
3393 #ifndef __REACTOS__
3394  rec->ipaddress = get_ipaddress( aa->FirstUnicastAddress );
3395 #endif
3396  rec->ipconnectionmetric = 20;
3397  rec->ipenabled = -1;
3398 #ifndef __REACTOS__
3399  rec->ipsubnet = get_ipsubnet( aa->FirstUnicastAddress );
3400 #endif
3401  rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
3402  rec->settingid = get_settingid( rec->index );
3403  if (!match_row( table, row, cond, &status ))
3404  {
3406  continue;
3407  }
3408  offset += sizeof(*rec);
3409  row++;
3410  }
3411  TRACE("created %u rows\n", row);
3412  table->num_rows = row;
3413 
3414  heap_free( buffer );
3415  return status;
3416 }
static struct array * get_dnsserversearchorder(IP_ADAPTER_DNS_SERVER_ADDRESS *list)
Definition: builtin.c:3218
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:185
static struct array * get_ipsubnet(IP_ADAPTER_UNICAST_ADDRESS_LH *list)
Definition: builtin.c:3288
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:3175
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:3069
#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:3255
#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:3344
static struct array * get_defaultipgateway(IP_ADAPTER_GATEWAY_ADDRESS *list)
Definition: builtin.c:3185
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 4026 of file builtin.c.

4027 {
4028  static const WCHAR wineprojectW[] = {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0};
4029  struct record_operatingsystem *rec;
4031  OSVERSIONINFOEXW ver;
4032  UINT row = 0;
4033 
4034  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
4035 
4036  ver.dwOSVersionInfoSize = sizeof(ver);
4037  GetVersionExW( (OSVERSIONINFOW *)&ver );
4038 
4039  rec = (struct record_operatingsystem *)table->data;
4040  rec->buildnumber = get_osbuildnumber( &ver );
4041  rec->caption = get_oscaption( &ver );
4042  rec->codeset = get_codeset();
4043  rec->countrycode = get_countrycode();
4044  rec->csdversion = ver.szCSDVersion[0] ? heap_strdupW( ver.szCSDVersion ) : NULL;
4045  rec->csname = get_computername();
4051  rec->locale = get_locale();
4052  rec->manufacturer = wineprojectW;
4053  rec->name = get_osname( rec->caption );
4054 #ifndef __REACTOS__
4056 #endif
4059  rec->osproductsuite = 2461140; /* Windows XP Professional */
4060  rec->ostype = 18; /* WINNT */
4061  rec->primary = -1;
4065  rec->suitemask = 272; /* Single User + Terminal */
4067  rec->systemdrive = get_systemdrive();
4070  rec->version = get_osversion( &ver );
4071  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
4072  else row++;
4073 
4074  TRACE("created %u rows\n", row);
4075  table->num_rows = row;
4076  return status;
4077 }
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:3674
UINT num_rows
const WCHAR * countrycode
Definition: builtin.c:1153
static WCHAR * get_systemdirectory(void)
Definition: builtin.c:3892
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:4017
smooth NULL
Definition: ftsmooth.c:416
static WCHAR * get_lastbootuptime(void)
Definition: builtin.c:3851
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:3936
const WCHAR * osarchitecture
Definition: builtin.c:1165
static WCHAR * get_codeset(void)
Definition: builtin.c:3910
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:3903
BYTE * data
USHORT wServicePackMajor
Definition: rtltypes.h:271
static WCHAR * get_osname(const WCHAR *caption)
Definition: builtin.c:3989
static const WCHAR os_serialnumberW[]
Definition: builtin.c:954
static DWORD get_operatingsystemsku(void)
Definition: builtin.c:4010
unsigned int UINT
Definition: ndis.h:50
static WCHAR * get_osversion(OSVERSIONINFOEXW *ver)
Definition: builtin.c:4002
static WCHAR * get_locale(void)
Definition: builtin.c:3923
const WCHAR * systemdirectory
Definition: builtin.c:1174
static WCHAR * get_osbuildnumber(OSVERSIONINFOEXW *ver)
Definition: builtin.c:3929
static WCHAR * get_computername(void)
Definition: builtin.c:1940
static WCHAR * get_localdatetime(void)
Definition: builtin.c:3867
const WCHAR * csname
Definition: builtin.c:1155
static WCHAR * get_countrycode(void)
Definition: builtin.c:3917
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 3418 of file builtin.c.

3419 {
3420  static const WCHAR dimm0W[] = {'D','I','M','M',' ','0',0};
3421  struct record_physicalmemory *rec;
3423  UINT row = 0;
3424 
3425  if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
3426 
3427  rec = (struct record_physicalmemory *)table->data;
3429  rec->configuredclockspeed = 0;
3430  rec->devicelocator = dimm0W;
3431  rec->memorytype = 9; /* RAM */
3432  rec->partnumber = NULL;
3433  if (!match_row( table, row, cond, &status )) free_row_values( table, row );
3434  else row++;
3435 
3436  TRACE("created %u rows\n", row);
3437  table->num_rows = row;
3438  return status;
3439 }
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 3441 of file builtin.c.

3442 {
3443  struct record_pnpentity *rec;
3445  HDEVINFO device_info_set;
3446  SP_DEVINFO_DATA devinfo = {0};
3447  DWORD idx;
3448 
3450 
3451  devinfo.cbSize = sizeof(devinfo);
3452 
3453  idx = 0;
3454  while (SetupDiEnumDeviceInfo( device_info_set, idx++, &devinfo ))
3455  {
3456  /* noop */
3457  }
3458 
3459  resize_table( table, idx, sizeof(*rec) );
3460  table->num_rows = 0;
3461  rec = (struct record_pnpentity *)table->data;
3462 
3463  idx = 0;
3464  while (SetupDiEnumDeviceInfo( device_info_set, idx++, &devinfo ))
3465  {
3467  if (SetupDiGetDeviceInstanceIdW( device_info_set, &devinfo, device_id,
3469  {
3470  rec->device_id = heap_strdupW( device_id );
3471 
3472  table->num_rows++;
3473  if (!match_row( table, table->num_rows - 1, cond, &status ))
3474  {
3476  table->num_rows--;
3477  }
3478  else
3479  rec++;
3480  }
3481  }
3482 
3483  SetupDiDestroyDeviceInfoList( device_info_set );
3484 
3485  return status;
3486 }
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
#define DIGCF_PRESENT
Definition: setupapi.h:171
Definition: ps.c:97

◆ fill_printer()

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

Definition at line 3488 of file builtin.c.

3489 {
3490  static const