?
Solved

Get Processor Type/Speed

Posted on 2003-02-26
6
Medium Priority
?
363 Views
Last Modified: 2008-02-01
I'm looking for code, or a dll, that will give me the processor speed (MHz), and Processor Type, on 95/98/2000/XP systems. It will only be used on AMD and Intel systems.

I've tried the GetCPU.dll and it didn't work very well for me. The optimal case would be actual VB code that can do this.

I'm using Visual Basic 6.

Thanks!
0
Comment
Question by:dankennedy
[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 5

Expert Comment

by:Rhaedes
ID: 8029026
0
 
LVL 2

Author Comment

by:dankennedy
ID: 8029114
I've seen that one. It uses the GetCPU.dll. It is really close to what I want however I think it's made by Intel so for Example when I run it on my system, it says...

Manufacturer: AMD
Type: Unknown

I've also run into problems running it on dual processor systems. It doesn't report the speed correctly.
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 8029707
try this free ocx

http://farwalk.51.net/
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 13

Accepted Solution

by:
AlbertaBeef earned 800 total points
ID: 8030099
First, download and install WMI core for your different operating systems, find it here:

http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/576/msdncompositedoc.xml

Then add to your application WMI scripts for Win32_Processor -  Code is below.  This will give it to you in different string variables.  Hope this helps!

' -------------- Code WMI_Win32_Processor ----------------

On Error Resume Next
strComputer = "." 'or you can specify a remote computer name

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
    strCaption = "Caption: " & objItem.Caption
    strCurrentClock = "CurrentClockSpeed: " & objItem.CurrentClockSpeed
    strDescription = "Description: " & objItem.Description
    strExtClock = "ExtClock: " & objItem.ExtClock
    strFamily = "Family: " & objItem.Family
    strL2CacheSize = "L2CacheSize: " & objItem.L2CacheSize
    strL2CacheSpeed = "L2CacheSpeed: " & objItem.L2CacheSpeed
    strCPUManufacturer = "Manufacturer: " & objItem.Manufacturer
    strMaxClockSpeed = "MaxClockSpeed: " & objItem.MaxClockSpeed
    strCPUName = "Name: " & objItem.Name
    strProcessorID = "ProcessorId: " & objItem.ProcessorId
    strProcessorType = "ProcessorType: " & objItem.ProcessorType
    strSocket = "SocketDesignation: " & objItem.SocketDesignation
    strStepping = "Stepping: " & objItem.Stepping
    Wscript.Echo "SystemName: " & objItem.SystemName
Next

0
 
LVL 2

Author Comment

by:dankennedy
ID: 8031376
That WMI looks like it'll give me exactly what I want... Thanks for the help.
0
 

Expert Comment

by:iain_stephen
ID: 14801303
I'm not sure who the maker of the software is, but we use a free utility called BGINFO - it is a slick little executable that you can run anytime (we put a command-line statement in a batch file and run it in startup) to give you a whack of useful info about any system running any version of windows, including processor info (and much more).

If you google bginfo.exe you will find it right away.  It's great for Servers and workstations.  
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

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 In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no 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…
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…
Suggested Courses

777 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