Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I retrieve CPU vendor info?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00985386
Message ID:
00985572
Vues:
36
Thanks Hugo!

>Dawa, you can use WMI for this. A crude example would be:
>
>
>local loCPUs, loCPU, lcKey, lcCPUKey, loTreeCollection, loWMI
>
>loWMI		= GETOBJECT('WinMgmts:')
>loCPUs		= loWMI.ExecQuery('Select * from Win32_Processor')
>for each loCPU in loCPUs
>	WITH loCPU
>		? 'Address Width             : ', .AddressWidth
>		? 'Architecture              : ', .Architecture
>		? 'Availability              : ', .Availability
>		? 'Caption                   : ', .Caption
>		? 'Config Manager Error Code : ', .ConfigManagerErrorCode
>		? 'CPU Status                : ', .CPUStatus
>		? 'Current Clock Speed       : ', .CurrentClockSpeed
>		? 'Current Voltage           : ', .CurrentVoltage
>		? 'Data Width                : ', .DataWidth
>		? 'Description               : ', .Description
>		? 'External Clock            : ', .ExtClock
>		? 'Family                    : ', .Family
>		? 'Family (Other)            : ', .OtherFamilyDescription
>		? 'L2 Cache Size             : ', .L2CacheSize
>		? 'L2 Cache Speed            : ', .L2CacheSpeed
>		? 'LoadPercentage            : ', .LoadPercentage
>		? 'Manufacturer              : ', .Manufacturer
>		? 'MaxClockSpeed             : ', .MaxClockSpeed
>		? 'Name                      : ', .Name
>		? 'PNP Device ID             : ', .PNPDeviceID
>		? 'Processor ID              : ', .ProcessorID
>		? 'ProcessorType             : ', .ProcessorType
>		? 'Revision                  : ', .Revision
>		? 'Role                      : ', .Role
>		? 'SocketDesignation         : ', .SocketDesignation
>		? 'Status                    : ', .Status
>		? 'Stepping                  : ', .Stepping
>		? 'UniqueId                  : ', .UniqueId
>		? 'Upgrade Method            : ', .UpgradeMethod
>		? 'Version                   : ', .Version
>		? 'Voltage Caps              : ', .VoltageCaps
>	endwith
>endfor
>
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform