Einzelnen Beitrag anzeigen

Lasse2002

Registriert seit: 29. Nov 2004
79 Beiträge
 
RAD-Studio 2009 Pro
 
#12

Re: Sekündlich wechselnde MAC Adresse!?

  Alt 14. Nov 2005, 22:29
Versuchs mal damit:

Delphi-Quellcode:
class function TAdapter.MacAddrToStr(const MacAddr: TMacAddress; AddrLen: Cardinal): String;
var
  I: Integer;
begin
  { Convert MAC-Address to string for display purposes... }
  Result := '';
  if AddrLen = 0 then
  begin
    Result := '00-00-00-00-00-00';
    Exit;
  end;
  for I := 0 to AddrLen-1 do // <-- hier sollte man besser von 0 bis AddrLen-1 zählen
    Result := Result + IntToHex(MacAddr[I], 2) + '-';
  Delete(Result, Length(Result), 1);
end;
Lasse
  Mit Zitat antworten Zitat