Sunday, April 22, 2012

Mendeteksi Serial Number Partisi Hardisk

uses
  SysUtils, Dialogs, Windows;
 
function HDD_Serial : string;
var
  SerialNum : dword;  
  a, b : dword;
  Buffer : array [0..255] of char;
begin
  if GetVolumeInformation('c:\', Buffer, SizeOf(Buffer), @SerialNum, a, b, nil, 0) then
    Result := IntToHex(SerialNum, 8)
  else
    Result := '';
end;

No comments:

Post a Comment