Solved

How to get a CPU speed using a Windows API

Posted on 1998-02-25
6
590 Views
Last Modified: 2012-05-04
How to get a CPU speed using a Windows API
I'm interested in MHZ value, NOT in processor type (386, 486, Pentium etc.)
0
Comment
Question by:tbbrhun
6 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1457913
Processor Speed (MHZ) or CPU Make (486, Pentium, Etc?)

I can get the CPU mae for you but I am not sure the MHZ is possible
0
 

Author Comment

by:tbbrhun
ID: 1457914
Edited text of question
0
 
LVL 2

Expert Comment

by:Veroland
ID: 1457915
Write a benchmark app.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 39

Accepted Solution

by:
abel earned 100 total points
ID: 1457916
I have a DLL of Intel (from the program CPUINFO) which does the trick. You only have to call the function in that DLL to get extended processor information. The function for the processor speed is very accurate (but of course uses a loop since you can't find that info on the chip itself...). I have the code for you in C and I can post that if you want, but it might be easier to download it yourself (full sourcecode, samples executables and dll's in one) at:

http://developer.intel.com/design/perftool/cpuid/

It's very easy to use. Look it up, try the executable coming with it if it fits your needs and try calling the dll's. The full documentation of the functions in the dll's is in the package as well. Don't bother about having to ship yet another dll with your app, it's only 20kb. And if you would want to incorporate it in your executable you can use the accompanying source code (be warned: assembler and C!).

Hope this helps you out.

Regards, Abel
0
 

Author Comment

by:tbbrhun
ID: 1457917
no comments, just THANKS A LOT, ABEL
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1457918
Bought This Question.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now