First add 1 label then
add this code after an
on your form.
next add this code by double clicking your form name.
add this code after an
Code:
end;
Code:
function getHWID(): String;
var
SerialNum,A,B: DWord;
C: array [0..255] of Char;
Buffer: array [0..255] of Char;
begin
if GetVolumeInformation(pChar('C:\'), Buffer, 256, @SerialNum, A, B, C, 256) then
Result := inttostr(SerialNum * Cardinal(-1))
else Result := '';
end;
next add this code by double clicking your form name.
Code:
label1.caption := GetHwid();