⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 processorshow.inc

📁 pipe类 pipe类 pipe类 pipe类 pipe类
💻 INC
📖 第 1 页 / 共 2 页
字号:
type
  tLogoTable = packed record
    ProcNum: Word;
    FileName: String;
  end;

var
  fLogoTable: array[0..45] of tLogoTable =
    (
       //K6 family
      (ProcNum: AMD_K6;             FileName: 'AMD_K6'),              //AMD K6(tm) Processor
      (ProcNum: AMD_K6_2;           FileName: 'AMD_K6_2'),            //AMD K6(tm)-2 Processor
      (ProcNum: AMD_K6_III;         FileName: 'AMD_K6_III'),          //AMD K6(tm)-III Processor
      (ProcNum: AMD_K6_2_plus;      FileName: 'AMD_K6_2_plus'),       //AMD K6(tm)-2+ Processor
      (ProcNum: AMD_K6_III_plus;    FileName: 'AMD_K6_III'),          //AMD K6(tm)-III+ Processor
      //K7 family
      (ProcNum: AMD_Athlon;         FileName: 'AMD_Athlon'),          //AMD K7(tm) Processor or AMD Athlon(tm) Processor
      (ProcNum: AMD_Duron;          FileName: 'AMD_Duron'),           //AMD Duron(tm) Processor
      (ProcNum: AMD_Athlon_XP;      FileName: 'AMD_Athlon_XP'),       //AMD Athlon(tm) XP Processor
      (ProcNum: AMD_Athlon_4;       FileName: 'AMD_Athlon_4'),        //AMD Athlon(tm) 4 Mobile Processor
      (ProcNum: AMD_Athlon_MP;      FileName: 'AMD_Athlon_MP'),       //AMD Athlon(tm) MP Processor
      (ProcNum: AMD_Duron_M;        FileName: 'AMD_Duron'),           //AMD Duron(tm) Mobile Processor
      (ProcNum: AMD_Athlon_XP_M;    FileName: 'AMD_Athlon_XP_M'),     //AMD Athlon(tm) XP Mobile Processor
      (ProcNum: AMD_Sempron_K7;     FileName: 'AMD_Sempron'),         //AMD Sempron(tm) Processor
      //K8 family
      (ProcNum: AMD_Opteron_64;     FileName: 'AMD_Opteron_64'),      //AMD Opteron(tm) Processor
      (ProcNum: AMD_Athlon_64;      FileName: 'AMD_Athlon_64'),       //AMD Athlon(tm) 64 Processor
      (ProcNum: AMD_Athlon_64_X2;   FileName: 'AMD_Athlon_64_X2'),    //AMD Athlon(tm) 64 X2 Processor
      (ProcNum: AMD_Sempron_K8;     FileName: 'AMD_Sempron'),         //AMD Sempron(tm) Processor
      (ProcNum: AMD_Athlon_64_ES;   FileName: 'AMD_Athlon_64'),       //Engineering sample
      (ProcNum: AMD_Athlon_64_FX;   FileName: 'AMD_Athlon_64_FX'),    //AMD Athlon(tm) 64 FX Processor
      (ProcNum: AMD_Turion_64;      FileName: 'AMD_Turion_64'),       //AMD Turion(tm) 64 Processor
      (ProcNum: AMD_Sempron_M;      FileName: 'AMD_Sempron_M'),       //AMD Sempron(tm) Mobile Processor
      (ProcNum: AMD_Athlon_64_M;    FileName: 'AMD_Athlon_64_M'),     //AMD Athlon(tm) 64 Mobile Processor
      //Pentium family
      (ProcNum: Intel_Pentium;      FileName: 'Intel_Pentium'),       //Intel Pentium Processor
      (ProcNum: Intel_Pentium_MMX;  FileName: 'Intel_Pentium_MMX'),   //Intel Pentium MMX Processor
      (ProcNum: Intel_Pentium_Pro;  FileName: 'Intel_Pentium_Pro'),   //Intel Pentium Pro Processor
      //Pentium-II family
      (ProcNum: Intel_Pentium_2;    FileName: 'Intel_Pentium_2'),     //Intel Pentium-II Processor
      //Celeron
      (ProcNum: Intel_Celeron;      FileName: 'Intel_Celeron'),       //Intel Celeron Processor
      //Pentium-III family
      (ProcNum: Intel_PIII;         FileName: 'Intel_PIII'),          //Intel Pentium-III Processor
      (ProcNum: Intel_PIII_M;       FileName: 'Intel_PIII_M'),        //Intel Pentium-III Mobile Processor
      (ProcNum: Intel_PIII_Xeon;    FileName: 'Intel_PIII_Xeon'),     //Intel Pentium-III Xeon Processor

      (ProcNum: Intel_Pentium_M;    FileName: 'Intel_Pentium_M'),     //Intel Pentium M Processor
      (ProcNum: Intel_Celeron_M;    FileName: 'Intel_Celeron_M'),     //Intel Celeron M Processor

      (ProcNum: Intel_P4_M;         FileName: 'Intel_P4_M'),          //Intel Pentium 4 Mobile Processor
      (ProcNum: Intel_P4_Celeron_M; FileName: 'Intel_Celeron'),       //Intel Celeron Mobile Processor

      (ProcNum: Intel_P4;           FileName: 'Intel_P4'),            //Intel Pentium-IV Processor
      (ProcNum: Intel_P4_HT;        FileName: 'Intel_P4_HT'),         //Intel Pentium-IV HT Processor
      (ProcNum: Intel_P4_Extreme;   FileName: 'Intel_P4_Extreme'),    //Intel Pentium-IV EE Processor
      (ProcNum: Intel_Extreme;      FileName: 'Intel_Extreme'),       //Intel Pentium Extreme Edition Processor
      (ProcNum: Intel_Pentium_D;    FileName: 'Intel_Pentium_D'),     //Intel Pentium D Processor
      (ProcNum: Intel_Celeron_D;    FileName: 'Intel_Celeron_D'),     //Intel Celeron D Processor
      (ProcNum: Intel_P4_Xeon;      FileName: 'Intel_P4_Xeon'),       //Intel Pentium-IV Xeon Processor

      (ProcNum: Intel_Itanium;      FileName: 'Intel_Itanium'),       //Intel Itanium
      (ProcNum: Intel_Itanium_2;    FileName: 'Intel_Itanium_2'),     //Intel Itanium 2


      (ProcNum: Transmeta_Crusoe;   FileName: 'Transmeta_Crusoe'),    //Transmeta Crusoe
      (ProcNum: Transmeta_Efficeon; FileName: 'Transmeta_Efficeon'),  //Transmeta Efficeon

      (ProcNum: 0805;               FileName: 'VIA_C3')               //VIA C3
    );

function GetLogoFileName(ProcNum: Word): AnsiString;
var
  j: byte;
  TR:TResourceStream;
  tmp: AnsiString;
  LogoName: string;
  lpBuffer: array[0..255] of Char;
begin
  try
    LogoName:='No_Logo';
    for j:=Low(fLogoTable) to High(fLogoTable) do
      if fLogoTable[j].ProcNum=ProcNum then LogoName:=fLogoTable[j].FileName;

    GetWindowsDirectory(lpBuffer, 255);
    TR:=TResourceStream.Create(0, UpperCase(LogoName), RT_RCDATA);
    result:=StrPas(lpBuffer)+'\Logo.png';
    if FileExists(result) then DeleteFile(result);
    TR.SaveToFile(result);
    TR.Free;
  except
  end;
end;

procedure TMainFrm.ShowCpuInfo(index: byte);
var
  fBitmap: tBitmap;
  fPNGImage: tPNGImage;
  LogoFileName: AnsiString;
  FStr, ExtFStr: string;
begin
  EnterCriticalSection(CriticalSection);
  try
  //CPU name
  FStr:=''; ExtFStr:='';
  if CPUInfo[index].nameinfo.cpuname='' then
                                          begin
                                            CpuNameV.Enabled:=false;
                                            CpuName.Font.Color:=$00CDB098;
                                          end
                                        else
                                          begin
                                            CpuNameV.Caption:=CPUInfo[index].nameinfo.cpuname;
                                            CpuNameV.Enabled:=true;
                                            CpuName.Enabled:=true;
                                          end;
  //Vendor string
  if CPUInfo[index].CPUid_m.std_vendor_string='' then
          begin
            VendorStringV.Enabled:=false;
            VendorString.Font.Color:=$00CDB098;
          end
        else
          begin
            VendorStringV.Caption:=CPUInfo[index].CPUid_m.std_vendor_string;
            VendorStringV.Enabled:=true;
            VendorString.Font.Color:=$008D4803;
            VendorString.Enabled:=true;
          end;

  //Core CodeName
  if CPUInfo[index].nameinfo.codename='' then
          begin
            CodeNameV.Enabled:=false;
            CodeName.Font.Color:=$00CDB098;
          end
        else
          begin
            CodeNameV.Caption:=CPUInfo[index].nameinfo.codename;
            CodeNameV.Enabled:=true;
            CodeName.Font.Color:=$008D4803;
            CodeName.Enabled:=true;
          end;

  //Rating
  if CPUInfo[index].nameinfo.revision='' then
          begin
            RevisionV.Enabled:=false;
            Revision.Font.Color:=$00CDB098;
          end
        else
          begin
            RevisionV.Caption:=CPUInfo[index].nameinfo.revision;
            RevisionV.Enabled:=true;
            Revision.Font.Color:=$008D4803;
            Revision.Enabled:=true;
          end;

  //Platform description
  if CPUInfo[index].nameinfo.platform_descr='' then
          begin
            PlatformV.Enabled:=false;
            Platform.Font.Color:=$00CDB098;
          end
        else
          begin
            PlatformV.Caption:=CPUInfo[index].nameinfo.platform_descr;
            PlatformV.Enabled:=true;
            Platform.Font.Color:=$008D4803;
            Platform.Enabled:=true;
          end;

  //Processor string
  if CPUInfo[index].CPUid_m.ext_cpu_name='' then
          begin
            ExtNameV.Caption:=CPUInfo[index].nameinfo.cpuname;
            ExtNameV.Enabled:=true;
            ExtName.Enabled:=true;
          end
        else
          begin
            ExtNameV.Caption:=CPUInfo[index].CPUid_m.ext_cpu_name;
            ExtNameV.Enabled:=true;
            ExtName.Enabled:=true;
          end;

  //Family
  FamV.Caption:=Format('%x', [CPUInfo[index].CPUid_m.std_family]);

  //Model
  ModV.Caption:=Format('%x', [CPUInfo[index].CPUid_m.std_model]);

  //Stepping
  SteppingV.Caption:=Format('%x', [CPUInfo[index].CPUid_m.std_stepping]);

  //Ext. Family, Ext. Model, Ext. Stepping
  if CPUInfo[index].FlagBrand=intel then
                  begin
                    ExtFamV.Caption:=format('%x', [CPUInfo[index].CPUid_m.std_extfam]);
                    ExtModV.Caption:=format('%x', [CPUInfo[index].CPUid_m.std_extmod]);
                    ExtSteppingV.Enabled:=false;
                    ExtStepping.Font.Color:=$00CDB098;
                  end
                else
                  begin
                    ExtStepping.Font.Color:=$008D4803;
                    ExtFamV.Caption:=format('%x', [(CPUInfo[index].CPUid_m.ext_extfamily shl 4) or CPUInfo[index].CPUid_m.ext_family]);
                    ExtModV.Caption:=format('%x', [(CPUInfo[index].CPUid_m.ext_extmodel shl 4) or CPUInfo[index].CPUid_m.ext_model]);
                    ExtSteppingV.Caption:=format('%x', [CPUInfo[index].CPUid_m.ext_stepping]);
                  end;

  //APIC
  if (CPUInfo[index].CPUfeatures.APIC=0) and (CPUInfo[index].CPUCount<=1) then
          begin
            APICIDV.Enabled:=false;
            APICID.Font.Color:=$00CDB098;
          end
        else
          begin
            APICIDV.Caption:=IntToStr(CPUInfo[index].CPUid_m.std_apic);
            APICIDV.Enabled:=true;
            APICID.Font.Color:=$008D4803;
            APICID.Enabled:=true;
          end;

  //Brand ID
  if (CPUInfo[index].CPUid_m.std_brand=0) then
          begin
            BrandIDV.Enabled:=false;
            BrandID.Font.Color:=$00CDB098;
          end
        else
          begin
            BrandIDV.Caption:=IntToStr(CPUInfo[index].CPUid_m.std_brand);
            BrandIDV.Enabled:=true;
            BrandID.Font.Color:=$008D4803;
            BrandID.Enabled:=true;
          end;

  //Tech Process
  if CPUInfo[index].nameinfo.technological.process='' then
          begin
            TPV.Enabled:=false;
            TP.Font.Color:=$00CDB098;
          end
        else
          begin
            TPV.Caption:=CPUInfo[index].nameinfo.technological.process;
            TPV.Enabled:=true;
            TP.Font.Color:=$008D4803;
            TP.Enabled:=true;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -