uses HardWareInfo.pas {引用自定义单元,文件见附件}
procedure TForm1.Button1Click(Sender: TObject);
var
CPUinfo:TCPU_info; //定义CPU对象
Diskinfo:TDisk_info; //硬盘
Memoryinfo:TMemory_info; //内存
NICinfo:TNIC_info; //网卡
VGAinfo:TVGA_info; //显卡
begin
//创建实例
CPUinfo:=TCPU_info.Create;
Diskinfo:=TDisk_info.Create;
Memoryinfo:=TMemory_info.Create;
NICinfo:=TNIC_info.Create;
VGAinfo:=TVGA_info.Create;
//显示硬件信息
memo1.Lines.Add('********************CPU*************************');
memo1.Lines.Add('制造商: '+CPUinfo.GetCpuFactory);
memo1.Lines.Add('型号: '+CPUinfo.GetCpuModel);
memo1.Lines.Add('个数: '+CPUinfo.GetCPUCount);
memo1.Lines.Add('********************硬盘*************************');
memo1.Lines.Add(Diskinfo.print_diskinfo);
memo1.Lines.Add('********************内存*************************');
memo1.Lines.Add(Memoryinfo.GetMemorysize);
memo1.Lines.Add(Memoryinfo.Getvirtualmemory);
memo1.Lines.Add(Memoryinfo.GetusingMemory);
memo1.Lines.Add('********************网卡*************************');
memo1.Lines.Add('序列号: '+NICinfo.GetNICID);
memo1.Lines.Add('本地IP: '+NICinfo.GetLocalIP);
memo1.Lines.Add('MAC地址: '+NICinfo.GetMAC);
memo1.Lines.Add('********************显卡*************************');
memo1.Lines.Add(VGAinfo.printf_VGAinfo);
end;
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/95eef01f3a292df593d786d4b9315c6035a873de?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
追问![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/f9dcd100baa1cd1119f012e1bc12c8fcc2ce2da8?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/a8ec8a13632762d025a1c47ea5ec08fa503dc650?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
报错,64位不能用汇编吗?