• Welcome to ForumKorner!
    Join today and become a part of the community.

Get hwid in delphi

djfshady

Member
Reputation
0
First add 1 label then

add this code after an
Code:
end;
on your form.

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();
 
Top