Solved

Getting CPU speed

Posted on 2000-03-14
7
210 Views
Last Modified: 2013-12-04
Is there a standard API for retrieving the machine CPU speed ?
I know the info is in the registry:
HKEY_LOCAL_MACHINEHARDWARE\DESCRIPTION\System\CentralProcessor\0

I'm curious if there is a stanard way to get it.

thanks,
Avi.


0
Comment
Question by:kavas
  • 3
  • 3
7 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 2617136
0
 

Author Comment

by:kavas
ID: 2617272
Sorry,
Looking for a standard API call, not a library.
If you were wondering, I'm comparing API's of a few OS as a part of my research.

thanks,
Avi.
0
 
LVL 1

Expert Comment

by:ntdragon
ID: 2617349
you mean in by programring

try c++builder there are some system components that will get it for you

or if you want it for dos as well take a comp that you know it's speed then make a loop and check how much time did it take for the comp to pass the loop then you can do it on any comp and colculate the comp speed
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.

 

Author Comment

by:kavas
ID: 2617496
1. I'm working with VC++ 6.0
2. Still looking for a WIN32 call.
3. Why not using HKEY_LOCAL_MACHINEHARDWARE\DESCRIPTION\System\CentralProcessor\0

Avi.


0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 2617578
>Is there a standard API for retrieving the machine CPU speed ?

There is no Win32 API function to do what you want. The closest is the GetSystemInfo function.
0
 

Author Comment

by:kavas
ID: 2617615
Do you know when: HKEY_LOCAL_MACHINEHARDWARE\DESCRIPTION\System\CentralProcessor\0

is calculated and how accurate it is ?
0
 
LVL 23

Expert Comment

by:chensu
ID: 2618096
I think that registry value is written when Windows is installed or there is any change to the CPU. The value is not 100% accurate.
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

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

919 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

21 Experts available now in Live!

Get 1:1 Help Now