Einzelnen Beitrag anzeigen

Hawkeye219

Registriert seit: 18. Feb 2006
Ort: Stolberg
2.227 Beiträge
 
Delphi 2010 Professional
 
#8

Re: Zugriff auf einzelne Bytes eines DWORD / Cardinal

  Alt 9. Mai 2007, 10:44
Hallo,

du kannst auch den Typ LongRec aus der Unit SysUtils verwenden:

Delphi-Quellcode:
var
  Value : Cardinal;
begin
  Value := $12345678;
  with LongRec(Value) do
    ShowMessage (Format('%.2x %.2x %.2x %.2x', [Bytes[0], Bytes[1], Bytes[2], Bytes[3]]));
end;
Gruß Hawkeye
  Mit Zitat antworten Zitat