读取硬盘序列号的源码,欢迎测试下传序列号

读取硬盘序列号的源码,欢迎测试上传序列号
最近在学习加密防破解和注册功能。
以前网上搜了一段取硬盘序列号的源码,
有时候会取出乱码。
今天又找了一段,可以取IDE和SIDC的,
修改了下,在D2010中无任何警告提示,找了几个网友试也能取出来。
为了更有效检测效果,所以附送上源码,
希望大家编译以后 把硬盘序列号和什么操作系统列出来,大家一起完善它吧
(大家都用得上)

我先:
硬盘序列号:MP2ZXAXLH62V3S  
操作系统: XP SP3

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

//------ 取IDE硬盘序列号
function GetIdeHDSerialNo: Ansistring;
const
  IDENTIFY_BUFFER_SIZE = 512;
type
  TIDERegs = packed record
    bFeaturesReg: Byte;     //Used for specifying SMART "commands".
    bSectorCountReg: Byte; //IDE sector count register
    bSectorNumberReg: Byte; //IDE sector number register
    bCylLowReg: Byte;      //IDE low order cylinder value
    bCylHighReg: Byte;     //IDE high order cylinder value
    bDriveHeadReg: Byte;   //IDE drive/head register
    bCommandReg: Byte;    //Actual IDE command.
    bReserved: Byte;       //reserved for future use. Must be zero.
  end;
  TSendCmdInParams = packed record
    cBufferSize: DWORD;     //Buffer size in bytes
    irDriveRegs: TIDERegs;  //Structure with drive register values.
    bDriveNumber: Byte;      //Physical drive number to send command to (0,1,2,3).
    bReserved: array[0..2] of Byte;
    dwReserved: array[0..3] of DWORD;
    bBuffer: array[0..0] of Byte; //Input buffer.
  end;
  TIdSector = packed record
    wGenConfig: Word;
    wNumCyls: Word;
    wReserved: Word;
    wNumHeads: Word;
    wBytesPerTrack: Word;
    wBytesPerSector: Word;
    wSectorsPerTrack: Word;
    wVendorUnique: array[0..2] of Word;
    sSerialNumber: array[0..19] of AnsiChar;
    wBufferType: Word;
    wBufferSize: Word;
    wECCSize: Word;
    sFirmwareRev: array[0..7] of AnsiChar;
    sModelNumber: array[0..39] of AnsiChar;