Forum: Object-Pascal / Delphi-Language
Delphi
by jfheins,
27. Okt 2008
Ich finde das heir wesenlich einfacher:type
Foo = record
case Integer of
0: (arr: array of Byte);
1: (
dummy1: Word;
Wert: Cardinal;
);
end;
Dann einfach in Wert deinen Cardinalwert reinschrieben, und du kannst ihn in arr als Bytearray wieder rausholen ;)
Forum: Object-Pascal / Delphi-Language
Delphi
by jfheins,
27. Okt 2008
Genau. DWord (32bit = 4 Bytes) und nicht 8 Bytes :mrgreen:
Schau dir mal variante records an, damit kannst du den Cardinal als Bytearray ansprechen und umgekehrt - falls es das ist, was du willst :gruebel: