delphi中如何获得硬盘序列号

来源:互联网 发布:大话西游手游源码 编辑:程序博客网 时间:2024/04/29 19:18
var SerialNum:   DWord; A,   B:   DWord; VolumeSerialNumber:   string   ; Key:   string   ; begin Key:= ' '; if   GetVolumeInformation(PChar( 'C:\ '), Nil,   0,   @SerialNum,   A,   B,   Nil,   0)   then VolumeSerialNumber   :=   IntToHex(HiWord(SerialNum),   4)   + IntToHex(LoWord(SerialNum),   4); Key   :=   VolumeSerialNumber   ; Label1.Caption   :=   Key   ; end; 
特此感谢:http://topic.csdn.net/t/20030304/12/1489377.html
原创粉丝点击