Delphiran - Delphi Tips
Question :
How can I get network card unique ID ?

Answer :
function  _SysGetNICAddress: string;
var
  Tmp    : TGUID;
  tmpstr : string;
  newstr : string;
  cnt    : integer;
begin
  try
    CoCreateGuid(Tmp);
    tmpstr := GuidToString(Tmp);
    tmpstr := Copy(tmpstr, Length(tmpstr)-12, 12);
    for cnt := 1 to 5 do
      newstr := newstr + copy(tmpstr, cnt*2-1, 2) + '-';
    newstr := newstr + copy(tmpstr, 11, 2);
  except
    newstr := '';
  end;
  Result := newstr;
end;
 
 

 
 
© All rights reserved 1999 BuyPin Software