艾尔文指环69:50分求用vb获得cpu型号,主频,外频等具体参数的方法(答案满意的再加分哦)

来源:百度文库 编辑:神马品牌网 时间:2024/04/30 17:59:21
要得到像优化大师的详细的资料,GetSystemInfo函数得到的不够详细,希望高手帮忙,先谢了

楼主,不好意思,我来回答吧,如果getsysteminfo得到的还是不够

详细,(应该是这样的,因为cpu的研发是每几个月就有变化,新的

特性不断的被开发出来)

那么我再给你讲一个全面的做法,这样你就可以得到所有的cpu信息:

cpu的信息是放在注册表中的,(任何硬件的信息在注册表当中都有登记)

他的位置:HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0

这里面包含CPU各项信息

所以你要知道读写注册表的vb的api函数:RegOpenKey,RegQueryValue以及

RegQueryValueEx这几个函数。

如果这样来做,编程就非常的简单,你可以试一试,

除此之外,如果在vb6当中不嵌入c或汇编,vb6之中这是不可能完成的任务

VB下取CPU ID 需内嵌汇编

Planet-Source-Code 源代码:

Title: VB+ASM CPUID - Determine the cpu make, model, features, serial number, cache details , speed etc.
Description: The sample project demonstrates the included cCPUID.cls which can used to determine the cpu make, model, features, serial number (if supported/enabled), cache details, speed etc. The sample can be used as the basis of a complete CPUID application. This would be a worthwhile project for those who are interested in such things... personally I\'m not, just in providing the means to the end. Any takers?
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=49073&lngWId=1

The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL