?
Solved

How to get a CPU speed using a Windows API

Posted on 1998-02-25
6
Medium Priority
?
611 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 39

Accepted Solution

by:
abel earned 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 4 hours left to enroll

765 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