function tform1.GetHDSerialNumber: LongInt;    

    {$IFDEF WIN32}

    var

      pdw : pDWord;

      mc, fl : dword;

    {$ENDIF}

    begin

      {$IfDef WIN32}

      New(pdw);

      GetVolumeInformation('c:\',nil,0,pdw,mc,fl,nil,0);

      Result := pdw^;

      dispose(pdw);

     {$ELSE}

      Result := GetWinFlags;

      {$ENDIF}

    end;

    procedure TForm1.Button1Click(Sender: TObject);

    begin

      edit1.Text:=inttostr(gethdserialnumber);

    end;

相关文章:

  • 2022-01-03
  • 2022-03-08
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-09-06
  • 2022-12-23
  • 2022-01-21
  • 2021-12-17
相关资源
相似解决方案