请问,如何编程取得硬盘、主板、CPU的序列号,谢谢 不知道注册表里有没有这些信息HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 有一个API的,你查一下。不过硬盘序列号如果要出厂的那个,还要动一点手脚 取得Cpu的编号及厂家!procedure GetCpuInfo;var R: array[0..19] of Char;var CpuID: Integer;begin FillChar(R, 20, 0); asm mov eax, 0 db 0fh, 0a2h // 其实就是cpuid汇编指令 mov dword ptr R[0], ebx mov dword ptr R[4], edx mov dword ptr R[8], ecx mov eax, 1 db 0fh, 0a2h // cpuid mov CpuID, edx end; ShowMessage('CPU制造商为:' + R); ShowMessage('序列号为:' + IntToStr(CpuID));end; //获得CPU信息procedure TForm1.Button1Click(Sender: TObject);VarSysInfo:SYSTEM_INFO;beginGetSystemInfo(Sysinfo);Edit1.Text:='系统中有'+IntToStr(Sysinfo.dwNumberOfProcessors)+'个CPU'+',类型为'+IntToStr(Sysinfo.dwProcessorType);end;//获得用户注册信息procedure TForm1.Button1Click(Sender: TObject);VarReg:TRegistry;beginReg:=TRegistry.Create;Reg.RootKey:=HKEY_LOCAL_MACHINE;Reg.OpenKey('Software\Microsoft\Windows NT\CurrentVersion',False);Edit1.Text:='当前路径:'+Reg.CurrentPath;Edit2.Text:='产品系列号:'+Reg.ReadString('ProductId');Edit3.Text:='产品名:'+Reg.ReadString('ProductName');Edit4.Text:='注册公司名称:'+Reg.ReadString('RegisteredOrganization');Edit5.Text:='用户名:'+Reg.ReadString('RegisteredOwner');Edit6.Text:='软件类型:'+Reg.ReadString('SoftwareType');Reg.CloseKey;Reg.Free;end; 如何通过SQL语句在access中动态创建查询对象? 关于“授权”客户端的使用策略方法 100分 求扫描后的部份数据,放入dbgrid中。 36选7的算法一共有多少种选法 关于ip地址的获得 请问如何让子窗口显示在母窗口的正中间呢? 二叉树遍历 请问有没有键的相应代码资料,比如#8代表Backspace之类的? 各位兄弟,小弟的幸福拜托你们了,帮我出出主意吧! 在Delphi6中,编译带源码的控件时,出现的问题? 想买些delphi方面的书 什么控件可以画流程图?(Tchart可以吗?怎么用?)
不过硬盘序列号如果要出厂的那个,还要动一点手脚
procedure GetCpuInfo;
var R: array[0..19] of Char;
var CpuID: Integer;
begin
FillChar(R, 20, 0);
asm
mov eax, 0
db 0fh, 0a2h // 其实就是cpuid汇编指令
mov dword ptr R[0], ebx
mov dword ptr R[4], edx
mov dword ptr R[8], ecx
mov eax, 1
db 0fh, 0a2h // cpuid
mov CpuID, edx
end;
ShowMessage('CPU制造商为:' + R);
ShowMessage('序列号为:' + IntToStr(CpuID));
end;
procedure TForm1.Button1Click(Sender: TObject);
Var
SysInfo:SYSTEM_INFO;
begin
GetSystemInfo(Sysinfo);
Edit1.Text:='系统中有'+IntToStr(Sysinfo.dwNumberOfProcessors)+'个CPU'
+',类型为'+IntToStr(Sysinfo.dwProcessorType);
end;//获得用户注册信息
procedure TForm1.Button1Click(Sender: TObject);
Var
Reg:TRegistry;
begin
Reg:=TRegistry.Create;
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey('Software\Microsoft\Windows NT\CurrentVersion',False);
Edit1.Text:='当前路径:'+Reg.CurrentPath;
Edit2.Text:='产品系列号:'+Reg.ReadString('ProductId');
Edit3.Text:='产品名:'+Reg.ReadString('ProductName');
Edit4.Text:='注册公司名称:'+Reg.ReadString('RegisteredOrganization');
Edit5.Text:='用户名:'+Reg.ReadString('RegisteredOwner');
Edit6.Text:='软件类型:'+Reg.ReadString('SoftwareType');
Reg.CloseKey;
Reg.Free;
end;