怎样制作生成序列号?要求改序列号只能在针对某台机器使用,在其他的机器上不能使用

解决方案 »

  1.   

    与硬盘序列号或者CPU序列号挂钩
      

  2.   

    硬盘序列,cpu序列怎么取得啊,(不懂,只有多问)
      

  3.   

    转贴:
    摘 要:不是取得卷标号,而是物理ID号
    关键字:磁盘序列号
    类 别:系统控制
     
     
    type
      MIDPtr = ^MIDRec;
      MIDRec = Record
        InfoLevel: word;
        SerialNum: LongInt;
        VolLabel: Packed Array [0..10] of Char;
        FileSysType: Packed Array [0..7] of Char;
      end;function GetDriveSerialNum(MID: MIDPtr; drive: Word): Boolean; assembler;
    asm
      push  DS    { Just for safety, I dont think its really needed }
      mov   ax,440Dh { Function Get Media ID }
      mov   bx,drive    { drive no (0-Default, 1-A ...) }
      mov   cx,0866h  { category and minor code }
      lds   dx,MID      { Load pointeraddr. }
      call  DOS3Call   { Supposed to be faster than INT 21H }
      jc    @@err
      mov   al,1           { No carry so return TRUE }
      jmp   @@ok
     @@err:
      mov   al,0           { Carry set so return FALSE }
     @@ok:
      pop   DS            { Restore DS, were not supposed to change it }
    end;procedure TForm1.NrBtnClick(Sender: TObject);
    var
      Info: MIDRec;
    begin
      Info.InfoLevel:=0; { Information Level }
      If GetDriveSerialNum(@Info,0) then  { Do something with it... }
        ListBox.Items.Add(IntToStr(Info.SerialNum)+' '+Info.VolLabel);
    end;--------------------------------------------------------------------------------
    BOOL GetVolumeInformation(    LPCTSTR lpRootPathName, // address of root directory of the file system
        LPTSTR lpVolumeNameBuffer, // address of name of the volume
        DWORD nVolumeNameSize, // length of lpVolumeNameBuffer
        LPDWORD lpVolumeSerialNumber, // address of volume serial number
        LPDWORD lpMaximumComponentLength, // address of system's maximum filename length
        LPDWORD lpFileSystemFlags, // address of file system flags
        LPTSTR lpFileSystemNameBuffer, // address of name of file system
        DWORD nFileSystemNameSize  // length of lpFileSystemNameBuffer
       );
      

  4.   

    调用api
    获取硬盘序列号或者CPU序列号
      

  5.   

    http://www.csdn.net/cnshare/soft/15/15890.shtm
    取电脑CPU序列号、网卡MAC地址、主板BIOS、操作系统序列号的Delphi控件(v 1.0)