Einzelnen Beitrag anzeigen

Kostas

Registriert seit: 14. Mai 2003
Ort: Gerstrhofen
1.062 Beiträge
 
Delphi 10 Seattle Enterprise
 
#8

AW: Bytes auf ein Integer auffädeln

  Alt 6. Sep 2018, 21:48
data[9] := $0;
data[10] := $5f;

Das Ergebnis sollte sein = 95($5f)
Ich habe gerade ausprobiert, leider ist das Ergebnis nicht 95 sondern 24320($5f00)

Delphi-Quellcode:
procedure SnapshotLength;
              begin
// FSnapshotLength := data[9];
// FSnapshotLength := FSnapshotLength shl 8;
// FSnapshotLength := FSnapshotLength or data[10];

                FSnapshotLength := PInt16(@data[9])^;
              end;
  Mit Zitat antworten Zitat