首页  编辑  

CPU的名称

Tags: /超级猛料/Hardware.硬件相关/CPU相关/   Date Created:

get the CPU name?

// this code will get the cpu identifier from the windows registry

uses

 Registry ;

function CPUname : string ;

var

 Reg : TRegistry ;

begin

 CPUname := '' ;

 Reg := TRegistry . Create ;

  try

   Reg . RootKey := HKEY_LOCAL_MACHINE ;

    if Reg . OpenKey ( '\Hardware\Description\System\CentralProcessor\0' , False ) then

     CPUname := Reg . ReadString ( 'Identifier' );

  finally

   Reg . Free ;

  end ;

end ;