如何获得主板或硬盘的序列号?(100分)

  • 主题发起人 shanglingli
  • 开始时间
S

shanglingli

Unregistered / Unconfirmed
GUEST, unregistred user!
我现在急需获得主板或硬盘序列号的源代码,哪位高手能给予赐教?[:(]
 
谁都没有!有也不能给
其实我也想学学。Zhoufujin@sohu.com
 
1.本站搜一下,多得很
2.asm.yeah.net有一个汇编的源码(只能在9x下用,不支持nt)
3.我有一个TVicHW32 v5.0破解版,提供各种操作低层硬件的,有demo,支持delhi,vb,vc等,
不过要安装一下(主要是拷两个文件,nt/2k/xp下还要修改注册表,提供了inf方式的
安装文件),如要可email me,或提供一个ftp我上传
 
-------------------------------------------------------------------------------
0170-0177 ---- HDC 2 (2nd Fixed Disk Controller) same as 01Fx (ISA, EISA)

-------------------------------------------------------------------------------
01F0-01F7 ---- HDC 1 (1st Fixed Disk Controller) same as 017x (ISA, EISA)

01F0 r/w data register

01F1 r error register
diagnostic mode errors:
bit 7-3 reserved
bit 2-1 = 001 no error detected
= 010 formatter device error
= 011 sector buffer error
= 100 ECC circuitry error
= 101 controlling microprocessor error
operation mode:
bit 7 = 1 bad block detected
= 0 block OK
bit 6 = 1 uncorrectable ECC error
= 0 no error
bit 5 reserved
bit 4 = 1 ID found
= 0 ID not found
bit 3 reserved
bit 2 = 1 command completed
= 0 command aborted
bit 1 = 1 track 000 not found
= 0 track 000 found
bit 0 = 1 DAM not found
= 0 DAM found (CP-3022 always 0)

01F1 w WPC/4 (Write Precompensation Cylinder divided by 4)

01F2 r/w sector count
01F3 r/w sector number
01F4 r/w cylinder low
01F5 r/w cylinder high

01F6 r/w drive/head
bit 7 = 1
bit 6 = 0
bit 5 = 1
bit 4 = 0 drive 0 select
= 1 drive 1 select
bit 3-0 head select bits

01F7 r status register
bit 7 = 1 controller is executing a command
bit 6 = 1 drive is ready
bit 5 = 1 write fault
bit 4 = 1 seek complete
bit 3 = 1 sector buffer requires servicing
bit 2 = 1 disk data read successfully corrected
bit 1 = 1 index - set to 1 each disk revolution
bit 0 = 1 previous command ended in an error

01F7 w command register
commands:
98 E5 check power mode (IDE)
90 execute drive diagnostics
50 format track
EC identify drive (IDE)
97 E3 idle (IDE)
95 E1 idle immediatete (IDE)
91 initialize drive parameters
1x recalibrate
E4 read buffer (IDE)
C8 read DMA with retry (IDE)
C9 read DMA without retry (IDE)
C4 read multiplec (IDE)
20 read sectors with retry
21 read sectors without retry
22 read long with retry
23 read long without retry
40 read verify sectors with retry
41 read verify sectors without retry
7x seek
EF set features (IDE)
C6 set multiple mode (IDE)
99 E6 set sleep mode (IDE)
96 E2 standby (IDE)
94 E0 standby immediate (IDE)
E8 write buffer (IDE)
CA write DMA with retry (IDE)
CB write DMA with retry (IDE)
C5 write multiple (IDE)
E9 write same (IDE)
30 write sectors with retry
31 write sectors without retry
32 write long with retry
33 write long without retry
3C write verify (IDE)
9A vendor unique (IDE)
C0-C3 vendor unique (IDE)
8x vendor unique (IDE)
F0-F4 EATA standard (IDE)
F5-FF vendor unique (IDE)


-------------------------------------------------------------------------------
 
我有硬盘序列号的。
EM
 
获取硬盘序列号:
procedure TForm1.Button1Click(Sender: TObject);
var
SerialNum : pdword;
a, b : dword;
Buffer : array [0..255] of char;
begin
if GetVolumeInformation('c:/', Buffer, SizeOf(Buffer), SerialNum, a, b, nil, 0) then
Label1.Caption := IntToStr(SerialNum^);
end;
 
9x下可以读取bios信息
with memo1.lines do
begin
Add('MainBoardBiosName:'+^I+String(pchar(ptr($FE061))));
Add('MainBoardBiosCopyRight:'+^I+string(pchar(ptr($FE091))));
Add('MainBoardBiosSerialNo:'+^I+string(pchar(ptr($FEC71))));//主板号

end;
(转贴的)
 

Similar threads

回复
0
查看
461
不得闲
回复
0
查看
737
不得闲
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
873
DelphiTeacher的专栏
D
顶部