Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Win32 API to check processor Speed ?
Message
De
14/04/1999 01:03:18
 
 
À
13/04/1999 23:00:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00208072
Message ID:
00208089
Vues:
24
>Hi,
>
>I like to know whether there is any know API or method to check
>my customer PC processor speed in VFP 5.
>

There's very little you can do to identify processor speed directly; if you're willing to invest a fair amount of time writing very low-level C code, Intel has published a couple of methods of identifying the specific processor in use; there's no machine instruction that returns the processor clock information directly, or in fact that provides a universally correct identification of the processor. (If there were, there wouldn't be nearly the trouble with dishonest vendors remarking processors!) If you want to look into it in detail, a good starting place would be The Intel Secrets Homepage; I'd start with Robert Collins' article on identifying Intel processors originally published in Doctor Dobbs Journal; try http://www.x86.org/ddj/Sep96/Sep96.html for a technical discussion of the problems of CPU identification.

Clock speed isn't something hard-wired into the processor; in fact, in most cases, any given processor can operate across a whole range of base clock frequencies anc clock multipliers. Varying the base clock speed and multiplier can make the apparent processor speed change. A good source on exactly what clock speed means and how it affects throughput can be found at Tom's Hardware Page, which has a number of pages devoted to overclocking, and links to a number of sites with even more detail.

You'd be better off writing a synthetic benchmark that revealed the effective throughput of a system rather than the apparent clock speed - the clock speed of the system doesn't tell you very much about how a system will perform, since clock speed and processor type may be less important than other things like available memory and I/O system performance. By testing specific issues that reflect how your application will perform relative to a known reference point, you can make an intelligent guess at how the system will behave with your application.

If you really want ot get detailed information about the processor, VFP and the Windows subsystem are probably the wrong places to look for help. VFP itself relies on Microsoft's MSINFO32.EXE to produce the System Information display accessed by VFP's Help system. Your best bet would be to run an external program that identified the CPU and apparent processor clock. There are any number of freeware and shareware products capable of creating a text file with a guess at the real processor identity and clock speed such as WinTune.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform